Skip to main content

Posts

Tableau Logical Functions

Tableau Logical Functions Why do we use logical calculations? Logical calculations allow you to determine if a certain condition is true or false (boolean logic). For example, you might want to quickly see if sales for each country you distribute your merchandise to were above or below a certain threshold. Function Syntax Description IN <expr1> IN <expr2> Returns TRUE if any value in <expr1> matches any value in <expr2>. The values in <expr1> can be a Set, list of literal values, or a combined field. Examples: SUM([Cost]) IN (1000, 15, 200) [SET] IN [COMBINED FIELD] AND IF <expr1> AND <expr2> THEN <then> END Performs a logical conjunction on two expressions. Example: IF (ATTR([Market]) = "Africa" AND SUM([Sales]) > [Emerging Threshold] )THEN "Well Performing" CASE CASE <expression> WHEN <value1> THEN <return1> WHEN <value2> THEN <return2> ... ELSE <default return> END Pe...

Tableau Case statement

Tableau Case statement Create Tableau Case statement using a measure and a dimension: CASE [Age Group] WHEN 'm_13_17' THEN [Mf Count] WHEN 'm_18_24' THEN [Mf Count] WHEN 'm_25_34' THEN [Mf Count] WHEN 'm_35_44' THEN [Mf Count] WHEN 'm_45_54' THEN [Mf Count] WHEN 'm_55_64'  THEN [Mf Count] WHEN 'm_55_64' THEN [Mf Count] END Or Otherwise use the IF statement as below: IF CONTAINS([Reporting Platform], 'facebook') THEN 'Facebook' ELSEIF CONTAINS([Reporting Platform], 'instagram') THEN 'Instagram' ELSEIF CONTAINS([Reporting Platform], 'facebook') AND CONTAINS([Reporting Platform], 'instagram') THEN 'Both' ELSE 'Other' OR better one below: IF  [Total Delay Mins]>=6 AND [Total Delay Mins]<=10 THEN "6 to 10 Minutes" ELSEIF   [Total Delay Mins]>10 AND  [Total Delay Mins]<=15 THEN "10 to 15 Minutes" ELSEIF [Total Delay Mi...

Sheet Selector for a Tableau Dashboard

Sheet Selector for a Tableau Dashboard Create a drop-down menu that lets users select an individual view and expand it to fill a dashboard. On an individual worksheet, right-click an empty area of the  Data  pane at left, and select  Create Parameter . In the Create Parameter dialog box, do the following: Enter a name that will appear appear above the menu, like  Select a View . For  Data type , select  String . For  Allowable values , select  List . Under  List of values , type  All  for the first value, and then add values with the name of each view in the dashboard. Click  OK .  On any sheet, right-click an empty area of the Data pane at left, and select  Create Calculated Field . Give the calculation a descriptive name like  Display sheet . In the formula text box, enter the name of the parameter you created above. Then click  OK . One by one, open each sheet ...

Tableau Tooltip "View is too large to show" message

View is too large to show in Tableau Tooltip Tableau Tooltip "View is too large to show" message appears when the display area of tooltip is not fitting. By default dimensions of the tooltip window such as maxwidth & maxheight is set to 300. Increase this to double or more to fit the tooltip will display it correctly. Default value is:  <Sheet name="Tool-tip Theme Gender" maxwidth=" 300 " maxheight=" 300 " filter="<All Fields>">

Create a pie chart in Tableau using multiple measures.

Create a pie chart in Tableau using multiple measures. Follow the steps below to create a pie chart even if the Show Me doesn't enable pie chart when you add 1 dimension and one or more measures: In the Marks card, select  Pie  from the drop down menu. Drag  Measure Values  to  Size . Drag  Measure Names  to  Color . Right click  Measure Values  or  Measure Names  on the Marks card and select  Edit Filter… Select the measures you would like to include in your pie chart. (optional) Drag a specific measure to  Label  (or  Measure Names  or  Measure Values  to add the name of the measures or the measures) to the pie chart.

Level of Detail Expressions in Tableau

Types of LOD expressions There are three types of LOD expressions you can create in Tableau: FIXED INCLUDE EXCLUDE You can also scope an LOD expression to the table. This is called a Table-Scoped LOD expression. FIXED FIXED level of detail expressions compute a value using the specified dimensions, without reference to the dimensions in the view. Example The following FIXED level of detail expression computes the sum of sales per region: {FIXED [Region] : SUM([Sales])} This level of detail expression, named [ Sales by Region ], is then placed on Text to show total sales per region. The view level of detail is [ Region ] plus [ State ], but because FIXED level of detail expressions do not consider the view level of detail, the calculation only uses the dimension referenced in the calculation, which in this case is Region. Because of this, you can see that the values for the individual states in each region are identical. For more information ab...