Skip to main content

Posts

Replace Text %20 with a space

Replace Text %20 with a space in Tableau There can be scenarios where the text contains %20 in place of spaces when the data is migrated from one database to the other. This usually happens in the column which contains text and ETL developers might not notice it. It can be corrected with a similar function in ETL tool however, the same simple function can be used in Tableau to achieve this using the Tableau in built function Replace. Syntax:  Replace("Text String dimension", 'characters to replace', " ") Example: Replace([Description Field], '%20', " ")

Replace missing or Null values

  Replace missing or Null values Option 1: Use ZN Select  Analysis  >  Create Calculated Field In the  Calculated Field  dialog box that opens, do the following, and then click  OK : Name the calculated field. In this example, the calculated field is named "Replace empty cells with zero (opt 1)" In the formula field, create a calculation similar to the following: ZN(SUM([Amount])) The ZN() function will replace any NULL values with zero Create a calculated field with a name like " Replace empty cells with last value (opt 1) " with a calculation similar to the following: IFNULL(     SUM([Amount]),     PREVIOUS_VALUE(0) ) IFNULL(..., PREVIOUS_VALUE(0)) will replace any NULL values with the last value of this calculation, which creates a running last value. Depending on how the view is built, it may be necessary to compute PREVIOUS_VALUE() differently. Replace [Amount] on Text on the Marks card with either [Replace em...

Tableau Color indicator from previous day to today.

Tableau Color indicator to compare sales previous day to today. The calculation uses LOOKUP function to get the rate for previous day. (It is like Today's value - Previous days value)/Previous days absolute value. If the above > 0 then "Color1" Else If the above <0 then "Color2" IF (ZN(([Success Rate])) - LOOKUP(ZN(([Success Rate])), -1)) / ABS(LOOKUP(ZN(([Success Rate])), -1))=0 then "white" ELSEIF (ZN(([Success Rate])) - LOOKUP(ZN(([Success Rate])), -1)) / ABS(LOOKUP(ZN(([Success Rate])), -1))>0 then "green" ELSEIF (ZN(([Success Rate])) - LOOKUP(ZN(([Success Rate])), -1)) / ABS(LOOKUP(ZN(([Success Rate])), -1))<0 then "red" END

Tableau donuts

 

Tableau server upgrade to Version 2020.3.1 on Single node

  Single-Server Upgrade -- Run Setup Below are the notes from Tableau Site on upgrade to Version: 2020.3.1 Upgrading Tableau Server on Windows from version 2018.1 or older requires special steps that are documented separately. For instructions for how to upgrade from a pre-2018.2 version, see   Upgrade from Tableau Server 2018.1.x or Earlier (Windows) . This topic is part of the Tableau Server in-place upgrade scenario for upgrading from Tableau Server on Windows 2018.2 or later. Run Setup Follow these steps to upgrade a single-node installation of  Tableau Server  version 2018.2 or later. Log onto the computer with an account that is a member of the local administrators group. Navigate to the folder where you copied the Tableau Server Setup program and run it. The Setup program checks system resources to confirm that the computer satisfies the minimum requirements and recommendations. The Setup program displays the location of your existing version and will install ...

Current Year and Last Year Measures Calculation in Tableau.

Current Year and Last Year Measures Calculation in Tableau. We can achieve this in several ways but according to Tableau KB below are the steps in 2 different ways: Option 1: 1. Drag Year(Order Date) to Columns 2. Create a Calculation that returns sales for this year called  Current year sales:     if YEAR([Order Date])=YEAR(TODAY()) then [Sales] end 3. Create a Calculation that returns sales for last year called  Last year sales:    IF YEAR([Order Date])=YEAR( TODAY())-1 then ([Sales]) end 4. Create a look up calculation called  look up if current year  with following formula:    IF ATTR(YEAR([Order Date])=YEAR(TODAY())) then    LOOKUP(SUM([Sales]),-1) end 5. Drag  look up if current year  to filters and select Special -> Non-null values 6. Hide field labels for columns Option 2: 1. Create a Calculation that returns sales for this year called  Current year sales:     if YEAR([Order Date])=YEAR(TODAY...