<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sam Grasland on Medium]]></title>
        <description><![CDATA[Stories by Sam Grasland on Medium]]></description>
        <link>https://medium.com/@samgrasland?source=rss-7ac74230ea36------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*fN4Kwa_FSM9vYolsfTlDYw.jpeg</url>
            <title>Stories by Sam Grasland on Medium</title>
            <link>https://medium.com/@samgrasland?source=rss-7ac74230ea36------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 08:44:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@samgrasland/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to Update Data in Tableau Next]]></title>
            <link>https://medium.com/@samgrasland/how-to-update-data-in-tableau-next-d292b0b673ba?source=rss-7ac74230ea36------2</link>
            <guid isPermaLink="false">https://medium.com/p/d292b0b673ba</guid>
            <category><![CDATA[tableaunext]]></category>
            <category><![CDATA[tableau]]></category>
            <dc:creator><![CDATA[Sam Grasland]]></dc:creator>
            <pubDate>Thu, 18 Jun 2026 13:07:48 GMT</pubDate>
            <atom:updated>2026-06-18T13:07:48.338Z</atom:updated>
            <content:encoded><![CDATA[<p>Keeping your data fresh in Tableau Next is essential for accurate insights and seamless workflows. Whether you’re tracking campaign performance or managing lead data, updating your data correctly ensures your models stay relevant — without having to rebuild them from scratch.</p><h3>What You Need to Know First</h3><p>Before diving into the steps, here are the key requirements for updating data in Tableau Next:</p><ul><li>✅ The original file must be a CSV with only one tab</li><li>✅ The updated file must be identical in structure</li></ul><p><em>(same column names, same order, same format)</em></p><h3>Step 1: Upload Your Original CSV File</h3><p>Start in your workspace where Tableau Next shows “No assets to analyze.”</p><p>If you already have data in your workspace, skip ahead to see how to add new data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/0*l39Qo8T8TRm3o--1.png" /></figure><p>Click “Connect to New Data” and upload your CSV file (tableau_data_original.csv).</p><p>Once uploaded, it appears as a Data Stream named something like:</p><p>tableau data original.csv</p><p>You’ll see a preview of the file and select the source table. Click Save to proceed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/339/0*phb9cAT0bBGaV9sL.png" /></figure><p>If you want to add new data to your workspace later, you can do so by clicking the same Connect to New Data option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/0*wS-nyoKL0iF_qJvw.png" /></figure><h3>Step 2: Open the Data Cloud App</h3><p>Use the App Launcher to search for and open the Data Cloud app. This is where you’ll manage your data streams, lake objects, and models.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/337/0*yE3hr0iph-xs2CRu.png" /></figure><h3>Step 3: Go to Data Streams and Find Your File</h3><p>Navigate to the Data Streams section. Here, you’ll find your uploaded file listed and ready for mapping or modeling.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/0*AOnUi4vZcrTb2pHy.png" /></figure><h3>Step 4: Update the File</h3><p>Upload your updated CSV file (tableau_data_updated.csv). You’ll see a confirmation message: “File Upload Complete.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/0*si935SNJU135rQpG.png" /></figure><p>⚠️ Important: You can only replace the original file with an identical CSV file. The fields must match exactly — same names, same order, same format.</p><h3>Conclusion</h3><p>Updating data in Tableau Next is straightforward once you understand the structure requirements. By following this workflow, you can:</p><ul><li>Keep your data fresh</li><li>Avoid rebuilding your semantic model</li><li>Automatically update your data model with new values</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d292b0b673ba" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dynamic KPI Formatting in Tableau: A Practical Guide (With Direct CASE Examples)]]></title>
            <link>https://medium.com/@samgrasland/dynamic-kpi-formatting-in-tableau-a-practical-guide-with-direct-case-examples-cb0797db5561?source=rss-7ac74230ea36------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb0797db5561</guid>
            <category><![CDATA[formatting]]></category>
            <category><![CDATA[tableau]]></category>
            <dc:creator><![CDATA[Sam Grasland]]></dc:creator>
            <pubDate>Thu, 18 Jun 2026 13:06:41 GMT</pubDate>
            <atom:updated>2026-06-18T13:06:41.605Z</atom:updated>
            <content:encoded><![CDATA[<p>When you use a parameter in Tableau to swap between KPIs, you inevitably run into the formatting problem:</p><ul><li>Revenue should look like $12,540,</li><li>User count should look like 1,294,</li><li>Conversion rate should look like 23.4%,</li></ul><p>And Tableau insists on applying one number format to all values coming out of a parameter-driven calculation. If one KPI is a percent and another is a currency? Too bad. Tableau formats the entire field based on the last pill’s number formatting.</p><p>This post walks through the simplest, most reliable way to dynamically format each KPI correctly — using a single CASE statement with explicit formatting logic per KPI.</p><h3>The Core Concept</h3><p>You’ll build:</p><ol><li>A numeric version of your KPI (used for axis, color, filters).</li><li>A formatted string version of the KPI (used for labels, tooltips, text).</li></ol><p>The numeric version stays unformatted.</p><p>The string version handles formatting per KPI.</p><p>This separation is what makes the whole thing work smoothly.</p><h3>Step 1 — Create the Raw KPI (Numeric Only)</h3><p>This calculation returns the underlying values, not formatting.</p><pre>CASE [KPI Parameter]<br>WHEN &#39;Revenue&#39; THEN SUM([Profit])<br>WHEN &#39;User Count&#39; THEN COUNTD([Customer Name])<br>WHEN &#39;Conversion Rate&#39; THEN [Profit Ratio]<br>END</pre><p>Use [KPI Value] for charts, axes, sizes, colors, filters.</p><p>Do not format this field — leave it numeric.</p><h3>Step 2 — Create the Formatted KPI (String)</h3><p>This is the value you display to the user. Each KPI gets its own formatting rules inside the CASE block. Below are the most commonly needed formats:</p><ul><li>currency</li><li>whole numbers</li><li>percentages</li></ul><pre>CASE [KPI Parameter]<br>//Currency<br>WHEN &#39;Revenue&#39; THEN &#39;$&#39; + STR(ROUND(SUM([Profit])))<br>//Number<br>WHEN &#39;Users&#39; THEN STR(COUNTD([Customer Name]))<br>//Percentage<br>WHEN &#39;Conversion Rate&#39; THEN STR([Profit Ratio] * 100) + &#39;%&#39;<br>END</pre><p>Use [KPI Label] only for:</p><ul><li>marks labels</li><li>tooltips</li><li>text tables</li><li>headers</li></ul><p>This ensures Tableau displays the correct format without messing with numeric behavior.</p><h3>Why This Approach Works</h3><p>Tableau cannot dynamically switch number formats for a single measure. But it can switch strings with no problem. By splitting the KPI into:</p><ul><li>numeric → for calculations</li><li>string → for display</li></ul><p>…you preserve everything Tableau needs for analytics, and you control everything the user sees.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb0797db5561" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Update Data in Tableau Next]]></title>
            <link>https://medium.com/@samgrasland/how-to-update-data-in-tableau-next-1e7d210ce0a6?source=rss-7ac74230ea36------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e7d210ce0a6</guid>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[tableaunext]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Sam Grasland]]></dc:creator>
            <pubDate>Tue, 23 Sep 2025 18:51:00 GMT</pubDate>
            <atom:updated>2025-09-23T18:51:00.426Z</atom:updated>
            <content:encoded><![CDATA[<p>Keeping your data fresh in Tableau Next is essential for accurate insights and seamless workflows. Whether you’re tracking campaign performance or managing lead data, updating your data correctly ensures your models stay relevant — without having to rebuild them from scratch.</p><h3><strong>What You Need to Know First</strong></h3><p>Before diving into the steps, here are the key requirements for updating data in Tableau Next:</p><ul><li>✅ The <strong>original file must be a CSV</strong> with <strong>only one tab</strong></li><li>✅ The <strong>updated file must be identical</strong> in structure</li></ul><p><em>(same column names, same order, same format)</em></p><p><strong>Step 1: Upload Your Original CSV File</strong></p><p>Start in your workspace where Tableau Next shows <strong>“No assets to analyze.”</strong></p><p>If you already have data in your workspace, skip ahead to see how to add new data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/1*A7rzIHyMhjhcm9l0ooxCsw.png" /></figure><p>Click <strong>“Connect to New Data”</strong> and upload your CSV file (tableau_data_original.csv).</p><p>Once uploaded, it appears as a <strong>Data Stream</strong> named something like:</p><p>tableau data original.csv — tableau data</p><p>You’ll see a preview of the file and select the source table. Click <strong>Save</strong> to proceed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/339/1*2kNMyjpChCEh2MuaXlnrkA.png" /></figure><p>If you want to add new data to your workspace later, you can do so by clicking the same <strong>Connect to New Data</strong> option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*fBGYB9bplLA2yhoJZjThYg.png" /></figure><p><strong>Step 2: Open the Data Cloud App</strong></p><p>Use the App Launcher to search for and open the <strong>Data Cloud</strong> app.</p><p>This is where you’ll manage your data streams, lake objects, and models.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/346/1*Yv6GEFeKJh9b4WheCtuKUA.png" /></figure><p><strong>Step 3: Go to Data Streams and Find Your File</strong></p><p>Navigate to the <strong>Data Streams</strong> section.</p><p>Here, you’ll find your uploaded file listed and ready for mapping or modeling.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/1*oYikUfa-Kx2pvCzEw13peg.png" /></figure><p><strong>Step 4: Update the File</strong></p><p>Upload your updated CSV file (tableau_data_updated.csv).</p><p>You’ll see a confirmation message: <strong>“File Upload Complete.”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/1*81mVA-oTHmwCAO8dhvijEA.png" /></figure><p>⚠️ <strong>Important:</strong></p><p>You can only replace the original file with an <strong>identical CSV file</strong>.</p><p>The fields must match exactly — same names, same order, same format.</p><p><strong>Conclusion</strong></p><p>Updating data in Tableau Next is straightforward once you understand the structure requirements. By following this workflow, you can:</p><ul><li>Keep your data fresh</li><li>Avoid rebuilding your semantic model</li><li>Automatically update your data model with new values</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e7d210ce0a6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SVG to PNG Conversion with Wand and ImageMagick in Python]]></title>
            <link>https://medium.com/@samgrasland/vg-to-png-conversion-with-wand-and-imagemagick-in-python-afeaadaec433?source=rss-7ac74230ea36------2</link>
            <guid isPermaLink="false">https://medium.com/p/afeaadaec433</guid>
            <category><![CDATA[png]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[svg]]></category>
            <category><![CDATA[imagemagick]]></category>
            <dc:creator><![CDATA[Sam Grasland]]></dc:creator>
            <pubDate>Mon, 28 Jul 2025 13:17:38 GMT</pubDate>
            <atom:updated>2025-07-28T13:17:56.863Z</atom:updated>
            <content:encoded><![CDATA[<h4>When working with vector graphics, SVG files are often the format of choice. However, situations arise where you need rasterized versions of these files, such as PNGs, for compatibility or performance reasons.</h4><p>This blog post will guide you through the process of converting SVG files to PNG using the Wand library in Python, while leveraging ImageMagick.</p><h3>Setup: Installing the Required Tools</h3><h4>1. Install Wand</h4><pre>pip install Wand</pre><h4>2. Install ImageMagick</h4><p>Download and install ImageMagick from here. During installation:</p><ul><li>Ensure you check the box for “Install legacy utilities”.</li><li>Add ImageMagick’s bin directory to your system&#39;s PATH environment variable.</li></ul><h3>Step-by-Step Code: Converting SVG to PNG</h3><p>Once the setup is complete, you can use the following Python script to batch convert all SVG files in a folder to PNG:</p><pre>import os<br>from wand.image import Image</pre><pre># Path to the folder containing SVG files<br>root_folder = &quot;.&quot;</pre><pre># Loop through all files in the folder<br>for filename in os.listdir(root_folder):<br>    if filename.endswith(&quot;.svg&quot;):<br>        svg_path = os.path.join(root_folder, filename)<br>        png_path = os.path.join(root_folder, f&quot;{os.path.splitext(filename)[0]}.png&quot;)<br>        <br>        # Convert SVG to PNG<br>        with Image(filename=svg_path) as img:<br>            img.format = &#39;png&#39;<br>            img.save(filename=png_path)<br>        print(f&quot;Converted {filename} to {png_path}&quot;)</pre><pre>print(&quot;All SVGs have been converted!&quot;)</pre><h3>How It Works</h3><ol><li>File Iteration: The script loops through all files in the specified folder and processes only those with the .svg extension.</li><li>SVG to PNG Conversion: The Image class from Wand loads the SVG file, sets its format to PNG, and saves it with the same name but a .png extension.</li><li>Output: PNG files are saved in the same directory as their SVG counterparts.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=afeaadaec433" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating Buttons in Tableau to Control Dynamic Zone Visibility]]></title>
            <link>https://medium.com/@samgrasland/creating-buttons-in-tableau-to-control-dynamic-zone-visibility-d1c1c49c25a5?source=rss-7ac74230ea36------2</link>
            <guid isPermaLink="false">https://medium.com/p/d1c1c49c25a5</guid>
            <category><![CDATA[tableau]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[dashboard]]></category>
            <category><![CDATA[dynamic-zone-visibility]]></category>
            <category><![CDATA[button]]></category>
            <dc:creator><![CDATA[Sam Grasland]]></dc:creator>
            <pubDate>Mon, 28 Jul 2025 13:16:22 GMT</pubDate>
            <atom:updated>2025-07-28T13:16:22.569Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Enhance your Tableau dashboards with interactive buttons to toggle between views using Dynamic Zone Visibility and custom shapes.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/426/0*yaRAB7pDQVHgmIJX.gif" /></figure><p>Dynamic Zone Visibility introduced in Tableau 2022.3, allows you to show or hide dashboard elements based on user interactions.</p><p>In this blog post, we’ll walk through creating buttons in Tableau that control Dynamic Zone Visibility. We’ll use an Excel sheet to define button names, bring it into Tableau, create a parameter, and set up parameter actions controlled by the buttons. We’ll also explore how to incorporate custom shapes to enhance the visual appeal of your buttons.</p><h3>Prerequisites</h3><ul><li>Tableau Desktop 2022.3 or later</li><li>Basic understanding of Tableau dashboard creation</li><li>An Excel file (we’ll create one in this tutorial)</li></ul><h3>Step 1: Create an Excel Sheet with Button Names</h3><p>First, we’ll create a simple Excel file that contains the names of our buttons.</p><h3>1. Open Excel and Create a New Workbook</h3><ul><li>Open Microsoft Excel or any spreadsheet software.</li><li>In Cell A1, enter the header “Button Name”.</li><li>In Cell A2, enter “Charts”.</li><li>In Cell A3, enter “Table”.</li></ul><p>Your Excel sheet should look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/181/0*VcELBQaSjF9WvAxv.png" /></figure><h3>2. Save the Excel File</h3><ul><li>Save the file with a meaningful name, such as “ButtonNames.xlsx”.</li><li>Remember the location where you save this file, as we’ll need to connect to it from Tableau.</li></ul><h3>Step 2: Connect Tableau to the Excel Sheet</h3><p>Now, we’ll bring the Excel data into Tableau.</p><h3>1. Open Tableau Desktop</h3><ul><li>Launch Tableau Desktop on your computer, specifically the workbook you want to add the Dynamic Zone Visibility.</li></ul><h3>2. Connect to the Excel File</h3><ul><li>Under Data, select “New Data Source”.</li><li>Navigate to the location where you saved “ButtonNames.xlsx” and open it.</li><li>Tableau will display the Data Source tab.</li></ul><h3>3. Verify the Data Connection</h3><ul><li>Ensure that the “ButtonNames” sheet is added to the data canvas.</li><li>You should see a preview of your data with the “Button Name” column showing “Charts” and “Table”.</li></ul><h3>Step 3: Create the Parameter</h3><p>We’ll create a parameter that will store the user’s selection when they click on a button.</p><h3>1. Create a New Parameter</h3><ul><li>In the Data pane, click the drop-down arrow next to Parameters and select “Create Parameter…”.</li></ul><h3>2. Configure the Parameter</h3><ul><li>Name: “View Selector”</li><li>Data Type: String</li><li>Current Value: “Charts” (you can choose either)</li><li>Allowable Values: List</li><li>Click “Add from Field” and select “Button Name” from the “ButtonNames” data source.</li></ul><p>Your parameter configuration should look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/569/0*gwJVlAOL2NCwh8Jp.png" /></figure><h3>3. Click OK</h3><ul><li>Your parameter “View Selector” is now created and appears under the Parameters section.</li></ul><h3>Step 4: Create the Calculated Fields for Dynamic Zone Visibility</h3><p>We need calculated fields that determine when to show or hide certain dashboard elements based on the parameter value.</p><h3>1. Create a Calculated Field for “Charts”</h3><ul><li>Right-click in the Data pane and select “Create Calculated Field…”.</li><li>Name: “Show Charts”</li><li>Click OK.</li></ul><p>Formula:</p><pre>[View Selector] = &#39;Charts&#39;</pre><h3>2. Create a Calculated Field for “Table”</h3><ul><li>Repeat the steps above.</li><li>Name: “Show Table”</li><li>Click OK.</li></ul><p>Formula:</p><pre>[View Selector] = &#39;Table&#39;</pre><p>These Boolean fields will return TRUE when the parameter matches the specified value.</p><h3>Step 5: Create the Buttons Using Custom Shapes</h3><p>Now, we’ll create the buttons using the “ButtonNames” data and custom shapes.</p><h3>1. Prepare Custom Shape Images</h3><ul><li>Find or create images that you want to use for your “Charts” and “Table” buttons.</li><li>Save these images in PNG or JPEG format with transparent backgrounds if possible.</li><li>Name the images accordingly, e.g., “Charts.png” and “Table.png”.</li></ul><h3>2. Add Custom Shapes to Tableau</h3><ul><li>Navigate to your Tableau repository folder, typically located at Documents &gt; My Tableau Repository.</li><li>Inside, find the “Shapes” folder.</li><li>Create a new folder named “CustomButtons”.</li><li>Place your custom shape images into this folder.</li></ul><h3>3. Refresh Shapes in Tableau</h3><ul><li>Back in Tableau Desktop, open any worksheet.</li><li>Click on “Shape” in the Marks card.</li><li>Click the drop-down menu in the “Edit Shape” window and select “Reload Shapes”.</li><li>Your “CustomButtons” folder should now appear in the list.</li></ul><h3>4. Create a New Worksheet for Buttons</h3><ul><li>Click the “New Worksheet” icon to create a new worksheet.</li><li>Name: “Buttons”</li></ul><h3>5. Build the Buttons</h3><ul><li>Drag “Button Name” from the “ButtonNames” data source to the Rows shelf.</li><li>The worksheet will display the two button names.</li></ul><h3>6. Assign Custom Shapes</h3><ul><li>In the Marks card, select “Shape” as the mark type.</li><li>Click on “Shape” in the Marks card.</li><li>In the “Edit Shape” window:</li><li>Select your “CustomButtons” folder.</li><li>Assign the “Charts” image to the “Charts” value.</li><li>Assign the “Table” image to the “Table” value.</li><li>Click OK.</li></ul><h3>7. Adjust the Layout</h3><ul><li>Right-click on the “Button Name” header in the view and uncheck “Show Header” to hide it.</li><li>Increase the size of the shapes using the Size slider in the Marks card.</li><li>Ensure the buttons are displayed vertically for easy placement.</li></ul><h3>Step 6: Assemble the Dashboard</h3><p>Now, we’ll bring everything together on a dashboard.</p><h3>1. Create a New Dashboard</h3><ul><li>Click on “New Dashboard”.</li><li>Name: “Interactive Dashboard”</li><li>Set the dashboard size as desired.</li></ul><h3>2. Add the Buttons</h3><ul><li>Drag the “Buttons” worksheet onto the dashboard.</li><li>Place it at the top or side, depending on your design preference.</li><li>Tip: Use a vertical or horizontal container for better alignment.</li></ul><h3>3. Add the Views</h3><ul><li>Drag the “Charts View” and “Table View” worksheets onto the dashboard. These can just be two charts you create, one being a chart of your choosing and table of your choosing.</li><li>Place them in the same position so they overlap.</li><li>Since we set up filters based on the “View Selector” parameter, only one will display at a time.</li></ul><h3>4. Enable Dynamic Zone Visibility</h3><ul><li>Select one of the views (e.g., “Charts View”) on the dashboard.</li><li>In the Layout pane, find the “Add Show/Hide Button” option and ensure it’s not enabled.</li><li>Scroll down to “Control Visibility Using Value”.</li><li>Check the box “Control visibility using value”.</li><li>Select the corresponding calculated field (e.g., “Show Charts” for “Charts View”).</li><li>Repeat this for the “Table View”, using “Show Table”.</li></ul><p>This setup ensures that only the view corresponding to the parameter value is visible.</p><h3>Step 7: Set Up Parameter Actions</h3><p>We need to configure the buttons to change the “View Selector” parameter when clicked.</p><h3>1. Add a Parameter Action</h3><ul><li>Go to the Dashboard menu and select “Actions…”.</li><li>In the Actions dialog, click “Add Action” and choose “Change Parameter…”.</li></ul><h3>2. Configure the Parameter Action</h3><ul><li>Name: “Button Selector Action”</li><li>Source Sheets: Select “Buttons”.</li><li>Run action on: Select.</li><li>Target Parameter: “View Selector”</li><li>Field: “Button Name”</li><li>Aggregation: Leave as Automatic</li></ul><h3>3. Click OK</h3><ul><li>Your parameter action is now set up.</li></ul><h3>Step 8: Test the Dashboard</h3><p>Now it’s time to see everything in action.</p><h3>1. Interact with the Buttons</h3><ul><li>In the dashboard, click on the “Charts” button.</li><li>The “Charts View” should display, and the “Table View” should be hidden.</li><li>Click on the “Table” button.</li><li>The “Table View” should now display, and the “Charts View” should be hidden.</li></ul><h3>2. Verify Dynamic Zone Visibility</h3><ul><li>Ensure that the views are toggling correctly without any lag.</li><li>The transition should be seamless, enhancing the user experience.</li></ul><h3>Resources</h3><ul><li><a href="https://help.tableau.com/current/server/en-us/dynamic_zone_visibility.htm?_gl=1*rh2npe*_ga*MTg5MDYwNzAzNi4xNzI2MDY4Nzkw*_ga_8YLN0SNXVS*MTczMDgzMjEzOC4yMDkuMS4xNzMwODMyMTY2LjAuMC4w&amp;ref=thedataschool.co.uk">Tableau Help: Dynamic Zone Visibility</a></li><li><a href="https://help.tableau.com/current/pro/desktop/en-us/actions_parameters.htm?ref=thedataschool.co.uk">Tableau Help: Parameter Actions</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1c1c49c25a5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Handling Quarter-Over-Quarter Calculations in Tableau]]></title>
            <link>https://medium.com/@samgrasland/handling-quarter-over-quarter-calculations-in-tableau-7a3443166e29?source=rss-7ac74230ea36------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a3443166e29</guid>
            <category><![CDATA[qoq]]></category>
            <category><![CDATA[kpi]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[tableau]]></category>
            <dc:creator><![CDATA[Sam Grasland]]></dc:creator>
            <pubDate>Mon, 28 Jul 2025 13:15:17 GMT</pubDate>
            <atom:updated>2025-07-28T13:15:17.185Z</atom:updated>
            <content:encoded><![CDATA[<p>Check out the dashboard <a href="https://public.tableau.com/app/profile/salome.grasland/viz/HowtoCreateaQoQKPI/Dashboard1?publish=yes&amp;ref=thedataschool.co.uk">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/324/0*TK7EXybEnQsnqwz_" /></figure><h3>The Problem: Selecting Q1 and Getting an Undefined Difference</h3><p>Quarter-over-quarter comparisons are crucial for understanding business trends, but they can sometimes present challenges, especially when dealing with the first quarter (Q1) of a timeline. When users interact with a parameter to select a specific quarter in your Tableau dashboard, they expect to see key metrics like profit differences compared to the previous quarter. However, if Q1 is selected, there is no “Q0” to compare against, resulting in null or nonsensical values. This can create confusion for users who might see an empty or misleading value when trying to understand changes from one period to the next.</p><h3>The Solution: Dynamic Calculated Fields</h3><p>To solve this, we need to create a calculated field that dynamically handles the situation when Q1 is selected.</p><h3>Create a Quarter Selector Parameter</h3><p>First, create a parameter to allow the user to select a quarter. This will drive the display and calculations:</p><ul><li>Name: Quarter Selector</li><li>Data Type: Integer</li><li>Values: 1, 2, 3, 4 (representing Q1, Q2, Q3, Q4)</li></ul><p>This parameter will give users the ability to choose which quarter they want to analyze.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/0*I-IBFdv_u5K9qVlU" /></figure><h3>Calculating the Percent Difference Between Quarters (QoQ)</h3><p>Here’s how you can create a calculated field to show the percent difference between the current and previous quarter:</p><p>Calculated Field: Difference in Profit</p><p>(SUM(IF DATEPART(‘quarter’, [Order Date]) = [Quarter Selector] THEN [Profit] END)</p><p>- SUM(IF DATEPART(‘quarter’, [Order Date]) = ([Quarter Selector] — 1) THEN [Profit] END))</p><p>/ SUM(IF DATEPART(‘quarter’, [Order Date]) = ([Quarter Selector] — 1) THEN [Profit] END)</p><p>Explanation:</p><ul><li>SUM(IF DATEPART(‘quarter’, [Order Date]) = [Quarter Selector] THEN [Profit] END): This part calculates the total profit for the selected quarter.</li><li>SUM(IF DATEPART(‘quarter’, [Order Date]) = ([Quarter Selector] — 1) THEN [Profit] END): This part calculates the total profit for the previous quarter.</li><li>(…) / SUM(IF DATEPART(‘quarter’, [Order Date]) = ([Quarter Selector] — 1) THEN [Profit] END): The difference between the current quarter’s profit and the previous quarter’s profit is divided by the previous quarter’s profit to get the percentage change.</li><li>Handling Q1: If Q1 is selected, the calculation for the previous quarter ([Quarter Selector] — 1) results in 0, which means there is no valid previous quarter to compare to, and the calculation will return NULL. This avoids showing misleading values for Q1.</li></ul><h3>Write a Calculated Field to Show Previous Quarter</h3><p>Next, create a calculated field that determines what value to display based on the selected quarter. This field should provide meaningful output for all quarters, including when Q1 is selected.</p><p>Calculated Field: Previous Quarter Difference Label</p><p>IF [Quarter Selector] = 1 THEN NULL</p><p>ELSEIF [Quarter Selector] = 2 THEN “∆Q1:”</p><p>ELSEIF [Quarter Selector] = 3 THEN “∆Q2:”</p><p>ELSEIF [Quarter Selector] = 4 THEN “∆Q3:”</p><p>END</p><p>Explanation:</p><ul><li>IF [Quarter Selector] = 1 THEN NULL: If Q1 is selected, we want to return NULL (or simply leave it blank) since there is no previous quarter to compare against.</li><li>ELSEIF [Quarter Selector] = 2 THEN “∆Q1”: For Q2, show the difference from Q1.</li></ul><h3>Step 3: Customize Visual Indicators</h3><p>To further improve the user experience, you can apply this calculated field as a label or a tooltip in your visualization to dynamically show which quarter is being compared. This makes it immediately clear to users what context they are viewing.</p><h3>Handling Color Indicators</h3><p>Often, we also want to apply color coding to differentiate between positive and negative changes, or null values. For example, if the profit difference is positive, you might want the color to be blue; if it’s negative, orange; and if there’s no comparison (such as Q1), you want it to be white to represent “no data available.”</p><p>Calculated Field for Coloring:</p><p>IF ISNULL([Difference in Profit]) THEN “White”</p><p>ELSEIF [Difference in Profit] &gt; 0 THEN “Blue”</p><p>ELSE “Orange”</p><p>END</p><p>This field can be used to color the squares or bars in your chart appropriately, providing a consistent visual representation of the data and making it easy to understand at a glance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/324/0*lA7082VDn2HCbnz3" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/353/0*nm27iTDvZI87OoMp" /></figure><p>Check out the dashboard <a href="https://public.tableau.com/app/profile/salome.grasland/viz/HowtoCreateaQoQKPI/Dashboard1?publish=yes&amp;ref=thedataschool.co.uk">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a3443166e29" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Feeding Daily Air Quality Data from an API to Tableau Pulse]]></title>
            <link>https://medium.com/@samgrasland/feeding-daily-air-quality-data-from-an-api-to-tableau-pulse-8a402973c4f9?source=rss-7ac74230ea36------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a402973c4f9</guid>
            <category><![CDATA[google-scripts]]></category>
            <category><![CDATA[tableau-pulse]]></category>
            <category><![CDATA[tableau]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[pulse]]></category>
            <dc:creator><![CDATA[Sam Grasland]]></dc:creator>
            <pubDate>Tue, 10 Sep 2024 15:06:18 GMT</pubDate>
            <atom:updated>2024-09-10T15:06:18.360Z</atom:updated>
            <content:encoded><![CDATA[<p>In this blog post, I’ll walk you through the process of creating an air quality indicator using data from the EPA API, cleaning it in Tableau Prep, and visualizing the results in Tableau Pulse.</p><h4>1. Introduction to the Project</h4><p>The goal of this project is to create a reliable air quality indicator by leveraging real-time data from the EPA, cleaning and preparing the data in Tableau Prep, and then using Tableau Pulse to analyze and visualize the data effectively.</p><h4>2. Data for Pulse</h4><p>To begin with, it’s essential to understand the type of data we’re working with. Air quality data typically includes various metrics like PM2.5, Ozone levels, and other pollutants on a daily level. For this project, the data was sourced from the EPA’s AirNow API, which provides daily air quality information.In order for a metric to work well in Pulse the data needs these qualities.</p><ul><li>Data Characteristics:</li><li>Granularity: Daily data is essential for tracking changes over time.</li><li>Completeness: The dataset should be free of gaps to ensure accurate analysis.</li><li>Field Names: Use understandable and human-readable field names.</li><li>Key Fields: Include a time dimension, a measure (e.g., Air Quality Indicators), filters (e. g., Pollutants), and a record ID for identifying outliers.</li></ul><h4>3. Getting the Data from the EPA API</h4><p>The EPA provides an API called <a href="https://docs.airnowapi.org/?ref=thedataschool.co.uk">AirNow</a>, which allows you to download daily air quality data. You can automate this process using Google Scripts, which will fetch the data daily and save it to your Google Drive.You will need to create a free account to get a key and call the API. The API key can be found at the top right corner of the Web Services tab. If you don’t want to use the API there is also the option to <a href="https://www.epa.gov/outdoor-air-quality-data/download-daily-data?ref=thedataschool.co.uk">download daily data</a> as a csv.</p><p>Steps:</p><ol><li>API Call: Set up an API call using the provided <a href="https://docs.airnowapi.org/forecastsbyzip/query?ref=thedataschool.co.uk">query</a> specifying the parameters like zip code, date, and the type of data (e.g., PM2.5 levels).</li></ol><p>Automation: Use Google Scripts to automate the data retrieval process. You can create a new script from Google Drive under the New button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/0*kN98WQDVQTlanUgM" /></figure><p>To write the script navigate to the &lt;&gt; tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/0*XVeW-LlcF5HalBf6" /></figure><p>The script below retrieves the last 90 days of data and saves it to drive, ensure to use your API key with it and designate your drive location.</p><pre>function Air_Quality_Data() {<br> // API key and other parameters<br> var apiKey = &#39;insert your API key&#39;;<br> var zipCode = &#39;10010&#39;;<br> var distance = 25; // Adjust the distance if necessary<br>// Initialize a variable to store the combined CSV content<br> var combinedCsvContent = &#39;&#39;;<br> var headerIncluded = false; // Flag to track if the header has been included<br>// Loop through the last 90 days<br> for (var i = 0; i &lt; 90; i++) {<br> // Calculate the date for each day<br> var date = new Date();<br> date.setDate(date.getDate() - i);<br> var dateStr = Utilities.formatDate(date, Session.getScriptTimeZone(), &#39;yyyy-MM-dd&#39;);<br> <br> // Construct the API URL for each day<br> var url = &#39;https://www.airnowapi.org/aq/forecast/zipCode/?format=text/csv&amp;zipCode=&#39;<br> + zipCode + &#39;&amp;date=&#39; + dateStr + &#39;&amp;distance=&#39; + distance + &#39;&amp;API_KEY=&#39; + apiKey;<br> <br> // Fetch the data from the API<br> var response = UrlFetchApp.fetch(url);<br> <br> if (response.getResponseCode() == 200) {<br> Logger.log(&#39;Data for &#39; + dateStr + &#39;: Fetched successfully.&#39;);<br> <br> // Get the CSV content for the day<br> var csvContent = response.getContentText();<br> <br> // Split the content into rows<br> var rows = csvContent.split(&#39;\n&#39;);<br> <br> // Append rows to the combined content, skipping empty rows and headers after the first one<br> for (var j = 0; j &lt; rows.length; j++) {<br> if (rows[j].trim() !== &#39;&#39;) { // Check if the row is not empty<br> if (!headerIncluded) {<br> // Include the header from the first file<br> combinedCsvContent += rows[j];<br> headerIncluded = true; // Set the flag to true after including the header<br> } else if (j &gt; 0) {<br> // Skip the header and only include data rows<br> combinedCsvContent += &#39;\n&#39; + rows[j];<br> }<br> }<br> }<br> } else {<br> Logger.log(&#39;Failed to fetch data for &#39; + dateStr + &#39;. HTTP Status code: &#39; + response.getResponseCode());<br> }<br> }<br> <br> // Folder ID where you want to save the file<br> var folderId = &#39;1NrAOYee2AGyCTdC8i7I2zBPZjERGQTIM&#39;;<br> <br> // Get the folder by ID<br> var folder = DriveApp.getFolderById(folderId);<br> <br> // Define the file name for the combined CSV<br> var fileName = &#39;NYCDailyAirQualityData.csv&#39;;<br> <br> // Search for an existing file with the same name in the folder<br> var files = folder.getFilesByName(fileName);<br> <br> // If the file exists, delete it<br> if (files.hasNext()) {<br> var file = files.next();<br> file.setTrashed(true);<br> }<br> <br> // Create a new file in the folder with the combined CSV content<br> folder.createFile(fileName, combinedCsvContent, MimeType.CSV);<br> Logger.log(&#39;Data saved: &#39; + fileName);<br>}</pre><p>The script can be scheduled to run daily, ensuring that you always have the most recent data available.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/0*9zfEATEpGPxn0KZ9" /></figure><h4>4. Cleaning and Preparing Data in Tableau Prep</h4><p>Once the data is retrieved, the next step is to clean and prepare it in Tableau Prep.</p><p>Key Steps in Tableau Prep:</p><ul><li>Import Data: Load the daily air quality data into Tableau Prep, you can either connect directly to Google Drive from Prep or upload it as a data source to Tableau Cloud. Make sure to embed your credentials!</li><li>Data Cleaning: Keep only the date values in date issue that are equal to date forecast, remove all columns except date issue, parameter, and AQI. Rename date issue to date and parameter to pollutant.</li><li>Data Transformation: Create a record ID using the ROW_NUMBER() function. Create a calculated field with this value {ORDERBY [Date]: ROW_NUMBER()}</li><li>Output: Save the cleaned dataset as a data source in Cloud, which will be used in Tableau Pulse for further analysis.</li></ul><h4>5. Creating the Air Quality Indicator in Tableau Pulse</h4><p>With the data cleaned and ready, the next step is to create the air quality indicator in Tableau Pulse. Pulse is a powerful tool for real-time monitoring and alerting based on key metrics.</p><p>Steps:</p><ol><li>Connect to Data: Create a new metric definition and select the data source you would like to use.</li><li>Metric Creation: Pass AQI into measure and aggregate it to average. Pass date to time dimension. Pass pollutant to metric filters. In the Insights tab pass Record ID to Record identifier.</li><li>Save the Definition: Once saved you can adjust the filters and follow the metric to get a daily feed of insights.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a402973c4f9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Build a Bar Chart with Gantt-Like Lines in Power BI]]></title>
            <link>https://medium.com/@samgrasland/how-to-build-a-bar-chart-with-gantt-like-lines-in-power-bi-333db885b9dc?source=rss-7ac74230ea36------2</link>
            <guid isPermaLink="false">https://medium.com/p/333db885b9dc</guid>
            <category><![CDATA[data-visualisation]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[tableau]]></category>
            <category><![CDATA[gantt-chart]]></category>
            <category><![CDATA[power-bi]]></category>
            <dc:creator><![CDATA[Sam Grasland]]></dc:creator>
            <pubDate>Tue, 10 Sep 2024 15:04:10 GMT</pubDate>
            <atom:updated>2024-09-10T15:04:10.954Z</atom:updated>
            <content:encoded><![CDATA[<p>A bar chart with Gantt-like lines is a hybrid visualization that combines the elements of a bar chart and a Gantt chart. This chart features:</p><ul><li>Bars: Represent specific metrics or values (e.g., sales, costs, or counts) for different categories or time periods.</li><li>Horizontal Axis (X-axis): Typically displays categories, time periods, or specific tasks.</li><li>Vertical Axis (Y-axis): Displays the values associated with each bar.</li></ul><p>For example, imagine you have a bar chart showing sales for different categories of furniture. Above each bar, a Gantt-like line represents the profit for each category. This visualization allows you to see sales and profit simultaneously.</p><h3>Steps to Create a Bar Chart with Gantt-Like Lines in Power BI</h3><p>This type of chart is not offered by default in Power BI, but you can create it by modifying the line and clustered column chart. Using data from Superstore, we will create a bar chart with Gantt-like lines.</p><h3>1. Create a Line and Clustered Column Chart</h3><p>Click on the empty canvas in Power BI and select the Line and Clustered Column Chart. An empty chart will appear on the screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/0*kym8EdYNw41bA9_d.png" /></figure><h4>2. Drag Values into the Visualization Pane</h4><ul><li>Drag Product Category to the X-axis.</li><li>Drag Sum of Sales to the Column Y-axis.</li><li>Drag Sum of Profit to the Line Y-axis.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/197/0*muNlqABepELSDOt4" /></figure><p>If desired, rename the values by right-clicking and selecting ‘Rename for this visual’.</p><p>At this point, your visualization will look like this. The line here can be misleading to viewers because it implies that the values are connected in some way and that we are observing some sort of change over time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/511/0*2R9wB_nt1mx_BEBm" /></figure><h4>3. Format the Visual</h4><ul><li>In the visualization pane, select the format button and open the dropdown menu for lines.</li><li>Turn off the ‘Show for all series’ option.</li><li>Open the Markers menu, turn it on, and change the shape type to a line. Other shape types such as circles or x’s may better suit your visualization needs.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*T-hGiH0jvx5Frc5C.png" /></figure><h4>4. Finalize Your Chart</h4><p>You now have a bar chart with Gantt-like lines! This visualization allows you to compare metrics (like sales and profit) effectively while presenting the data in a visually engaging manner.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/0*Ld3R1pqwrvGREH-x" /></figure><h3>Conclusion</h3><p>Creating a bar chart with Gantt-like lines in Power BI can help you visualize and compare different metrics more effectively. By following the steps outlined above, you can enhance your data presentations and provide more insightful visualizations for your audience.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=333db885b9dc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Generating Dates with the Multi-Row Formula Tool in Alteryx]]></title>
            <link>https://medium.com/@samgrasland/generating-dates-with-the-multi-row-formula-tool-in-alteryx-86e5d41011cf?source=rss-7ac74230ea36------2</link>
            <guid isPermaLink="false">https://medium.com/p/86e5d41011cf</guid>
            <category><![CDATA[data-cleaning]]></category>
            <category><![CDATA[alteryx]]></category>
            <category><![CDATA[alteryx-designer]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-generation]]></category>
            <dc:creator><![CDATA[Sam Grasland]]></dc:creator>
            <pubDate>Tue, 10 Sep 2024 14:59:59 GMT</pubDate>
            <atom:updated>2024-09-10T14:59:59.617Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Multi-Row Formula Tool</h3><p>It is not uncommon to have a start date and end date present in your data, but be missing the values in between. The Multi-Row Formula tool in Alteryx is the thing you need if you’re in this situation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/67/0*8nS_5hXb2Y7wgc60" /></figure><p>The Multi-Row Formula tool can be found under the preparation tab or by using the search function.</p><p>In the dataset I am working with I have daily data for 1 year for 100 cities, however, in my Date field I only have the first day of the year available.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/0*B3OIb5XBVWtE4A7G" /></figure><h3>Converting Data Type to DateTime</h3><p>Note! It’s important that your Date field be in the format of DateTime in order to work with the Multi-Row Formula tool.</p><p>You can check your fields datatype by either checking the metadata</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/0*EeYSRjzJi7UTmanA" /></figure><p>Or by using the Select Tool and looking in the type column</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/91/0*iDvCR5WkKj6vlAJl" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/0*3iOnecVoc2TJlLKH" /></figure><p>If you do need to change your field to DateTime then use the DateTime tool found under the Parse tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/60/0*Ti8MTc6WGO7LElxr" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/407/0*8P8PAn1EoI3xI0oA" /></figure><h3>Setting up the Multi-Row Formula tool</h3><p>In order to generate dates for the rest of the rows, restarting for every city and at the end of one year we will have to use the Multi-Row Formula tool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/616/0*RCw6hQQYs47t4Bw4" /></figure><ul><li>In the Multi-Row Formula tool I have assigned it to Update Existing Field, because we are updating the existing field ‘Date’. However, I could create a new column by selecting create new field. This is a good option if you want to keep the Date column unchanged.</li><li>I’ve set Value for Rows that don’t Exist to 0 or Empty because the rows were not null, but empty. This is an important distinction to make.</li><li>The Group By option let’s you decide if generating rows will restart with certain groupings. For example, I could restart generating rows every time the field ‘File Name’ changes. In this case I dont have to because the first day of the year listed for every new instance of FileName.</li><li>The Variables/Functions/Saved Expression window allows you to double click on the values automatically putin them into the Expression window.</li><li>In the Expression window I have the formula:</li></ul><p>IF ISNULL([Date]) <br>THEN DateTimeAdd([Row-1:Date], +1, ‘days’) <br>ELSE [Date] <br>ENDIF</p><p>In plain text this formula means:</p><ol><li>IF ISNULL([Date]):</li></ol><ul><li>This part checks if the value in the Date column for the current row is null (i.e., missing or empty).</li><li>ISNULL() is a function that returns True if the value is null, and False otherwise.</li></ul><ol><li>THEN DateTimeAdd([Row-1:Date], +1, ‘days’):</li></ol><ul><li>This part of the formula is executed if the Date is found to be null.</li><li>DateTimeAdd() is a function used to add a specific interval to a date. In this case, it adds one day (+1) to the Date of the previous row ([Row-1:Date]).</li><li>‘days’ specifies the unit of time to be added to the date, confirming that the addition should be counted in days.</li></ul><ol><li>ELSE [Date]:</li></ol><ul><li>This part of the formula is executed if the Date is not null.</li><li>It simply retains the original date from the Date column for that row.</li></ul><ol><li>ENDIF:</li></ol><ul><li>This ends the conditional logic structure.</li></ul><p>Now run the tool and you will see the Date field filled with the dates you need!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/0*umxbLpwu3XMUuoFo" /></figure><p>The multi-row tool can be used not just for dates, but also to create a RecordID that resets for every product or to calculate a 3-month rolling average. Its uses are varied!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=86e5d41011cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating a Global Reset Button in Tableau]]></title>
            <link>https://medium.com/@samgrasland/creating-a-global-reset-button-in-tableau-d91dcddc79b2?source=rss-7ac74230ea36------2</link>
            <guid isPermaLink="false">https://medium.com/p/d91dcddc79b2</guid>
            <category><![CDATA[reset]]></category>
            <category><![CDATA[dashboard]]></category>
            <category><![CDATA[tableau-desktop]]></category>
            <category><![CDATA[tableau]]></category>
            <category><![CDATA[dashboard-design]]></category>
            <dc:creator><![CDATA[Sam Grasland]]></dc:creator>
            <pubDate>Tue, 10 Sep 2024 14:56:56 GMT</pubDate>
            <atom:updated>2024-09-10T14:56:56.333Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GWdAmpbBzeegl1Rv.png" /></figure><p>Tableau simplifies the implementation of filters and parameters, making it easy to create dynamic dashboards. However, resetting these views to their original state can be surprisingly complex. While tableau does have a built in reset on filters, they must be individually clicked filter by filter. And the feature is lacking on parameters. The capability to reset all filters is not currently built in to Tableau. Below, we’ll explore how to design a universal reset button that effectively clears both filters and parameters across your dashboard.</p><p>Below we have a dashboard that allows you to search through products in the superstore data, as well as refine the search by year. Download the workbook <a href="https://github.com/SSGrasland/Blogging/blob/main/Creating%20a%20Global%20Reset%20Button/Global%20Reset.twb?ref=thedataschool.co.uk">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/494/0*TkpoYbsFa2TxUFF4" /></figure><p>In order to reset the view there are a couple things we have to do.</p><ol><li>Create a reset button</li></ol><ul><li>In a calculated field called Reset write ‘’, this blank string will trigger the parameter action to reset the filters and parameters. Place the calculated field on text.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*V4_D00HAwo-Sc9Jm" /></figure><ul><li>In a separate sheet create a reset button by putting the Avg(1) on rows. Create a calculated field called reset image that contains the text ‘Reset’ and place it on text. Change the text alignment to middle center.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xbOywMHLRSunkphk" /></figure><ul><li>Build your dashboard and add the reset button. Floating above the reset button float the sheet that contains the empty string. Users will actually be clicking the sheet that contains the empty string, the reset button is hidden below to indicate to click here. Turn the background off on the sheet that contains the empty string.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/235/0*l0EH4kAJlCj0x56n" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/206/0*1jbnmSra_SoQKwmu" /></figure><ol><li>Fix the highlight function on the reset button</li></ol><ul><li>You’ll notice that when you click the reset button it’ll highlight itself blue and you’ll need to click it twice in order to actually make it work. In order to get around this create a boolean parameter called Dont Select.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/573/0*L3ZofeVTPIa102qH" /></figure><ul><li>Add a parameter action for the highlight</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*s725hzL2U6BrnplA" /></figure><ul><li>Add it for the filter as well</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/0*Z9jdnKDHClA9AGAv" /></figure><ol><li>Add the parameter action and filter action that are activated by clicking on the sheet</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/507/0*ByTwCQSeO1E9ajy4" /></figure><p>You now have a functional reset button!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d91dcddc79b2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>