Skip to main content

Posts

Age calculation in Tableau measure

Create a calculated field for Age Create a calculated filed using the calculation below: (Replace the [Birth Date] with the date of birth column from your datasource) IF DATEADD('year', DATEDIFF('year', [Birth Date], TODAY()), [Birth Date])> TODAY() THEN                             DATEDIFF('year', [Birth Date], TODAY())-1                             ELSE                             DATEDIFF('year', [Birth Date], TODAY())                             END
Recent posts

Tableau Case Statement

Tableau Case Statement The CASE function evaluates  expression , compares it to a sequence of values,  value1 ,  value2 , etc., and returns a result.  When a value that matches  expression  is encountered, CASE returns the corresponding return value. If no match is found, the default return expression is used. If there is no default return and no values match, then Null is returned. CASE is often easier to use than IIF or IF THEN ELSE. Typically, you use an IF function to perform a sequence of arbitrary tests, and you use a CASE function to search for a match to an expression. But a CASE function can always be rewritten as an IF function , although the CASE function will generally be more concise. Many times you can use a group to get the same results as a complicated case function. Syntax: CASE <expression>  WHEN <value1> THEN <return1>  WHEN <value2> THEN <return2> ... E LSE <default return>  END Examples: CASE [Region] WHEN 'West' THEN 1 W

Tableau Server upgrade process for 2020.4 version

 Tableau Server upgrade process for 2020.4 version   1.        It is recommended to take snapshot of the server box with the help of IT-Admin Team so that it can be restored in case of failure. 2.        Login to the Machine where Tableau prod server is installed(doctableauprod1). 3.        In the server box, go to Command prompt and type cmd to open it.   4.        Enter the below command to run the backup   U:\> tsm maintenance backup -f ts_backup -d Job id is '57', timeout is 1440 minutes. 6% - Starting the Active Repository instance, File Store, and Cluster Controller. 13% - Waiting for the Active Repository, File Store, and Cluster Controller to start. 20% - Installing backup services. 26% - Estimating required disk space. 33% - Gathering disk space information from all nodes. 40% - Analyzing disk space information. 46% - Checking if sufficient disk space is available on all nodes. 53% - Backing up configuration. 60% - Backing up object s

Post Upgrade Cleanup Tableau Server

  Tableau Server Post Upgrade Cleanup When upgrading from Tableau Server 2018.2 or later, you do not uninstall the previous version. The upgrade process is designed to install a new version side-by-side with your existing version, and then switch from the earlier version to the later one. When doing a TSM-to-TSM upgrade (version 2018.2.x to later version), you must leave your existing version in place and running until just before you upgrade using the upgrade script. If you uninstall your existing version before upgrading, you will not be able to upgrade. For your end-users, this has the impact of reducing downtime because you install your new version while the existing version is running. The only time the server is not running is during the period the upgrade script is actually upgrading to the new version. After installing the new version and upgrading, you can uninstall the previous version when you choose to do so. You can leave the older version installed indefinitely, though on

Tableau Server Backup and Restore Procedure

Tableau Server Backup and Restore Procedure Tableau Server Backup and Restore Procedure Tableau Server   data: Go to Windows -> Search Type Cmd. It will display the command prompt then enter the backup command below: U:\>tsm maintenance backup -f ts_backup -d It will show the command prompt, make sure that you are in the drive where Tableau installed like D: Use the below command to take a back of the Tableau server. tsm maintenance backup -f ts_backup -d Once the backup is complete it will show the path like: Backup written to 'D:\Tableau\Tableau Server\data\tabsvc\files\backups\ts_backup-2021-02-13.tsbak' on the controller node.  According to Tableau help below are the steps to  Restore from a backup Version: 2020.4 Use the  tsm maintenance restore   command to restore your  Tableau Server  data. You might do this if you had a system failure and need to restore your data, if you need to switch back to a previous version of  Tableau Server  (for example, if there is a

Multiple Value Selection Parameter in Tableau

 Creating a Multiple Value Selection Parameter Parameter created in regular way allows to select only one value at a time but in order to create multi select parameter, Tableau has given the below Options according to their tech note: Option 1: Using Set Controls Starting in Tableau Desktop 2020.2 Set Controls allow end users to change the values in a set. This example allows the users to select two sets of states to see on one map, but sets are flexible and can be used in many scenarios. Right-click [State] in the left-hand data pane and Create > Set… In the Create Set dialog, give the set a name and click OK. In this example, the set is called "State Set A" Right-click [State Set A] in the data pane and check Show Set Repeat steps 1-3 to for "State Set B" Select Analysis > Create Calculated Field 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 "Sel

Filtering to the Single Most Recent Date

Filtering to the Single Most Recent Date Tableau recommends the below 4 options to filter a worksheet to the most recent single date: Option 1  Use the Latest Date Preset feature. Unlike the additional options listed below, this option will allow for the use of the filters card to select additional dates.      Option 2 Select  Analysis  >  Create Calculated Field . In the Calculated Field dialog box that opens, enter a name for the field. In the formula field, create a calculated field similar to the following: [Order Date] = {FIXED : MAX([Order Date])} Drag the newly created calculated field from the Measures pane to the  Filter  shelf. In the Filter dialog box that opens, select  True ,   and then click  OK .   Option 3 (if LOD calculations are not possible): Select  Analysis  >  Create Calculated Field . In the Calculated Field dialog box that opens, enter a name for the field. In the formula field, create a calculated field similar to the following and click  OK : IF MAX([O