1 Reply Latest reply on Jun 19, 2016 2:18 PM by Yuriy Fal

    Logical functions into Lookup/Array data?

    Connor Zimmerman

      Currently for the project I am doing I'm using logical functions created in calculated fields in Tableau to generate thresholds. These thresholds will be then put against a sum of the number of records in a list and depending on the size of the sum, that sum will either be highlighted or not highlighted depending on if it passes the threshold.

       

      My question is if it is possible to utilize lookups/arrays to give me the thresholds based on certain criteria of the data. Right now the logistical function looks like this:

       

      IF [Risk Rating]="Level 1" AND [Market]="High" and [Box Color]="Red" THEN "5"

      ELSEIF [Risk Rating]="Level 1" AND [Market]<>"High" and [Box Color]="Red" THEN "10"

      ELSEIF...

       

      The lines go on for another 16 more lines. There are 3 possible levels for "Risk Rating", 2 possible fields for "Market" and 3 possible colors to "Box Color". Because of all 18 lines and the size of the file that I am using (Excel file, about 20,000 lines of data) the processing time is reduced. Is there any way to convert the logical function into a lookup function, or an array function that could allow the processing time to be reduced?

        • 1. Re: Logical functions into Lookup/Array data?
          Yuriy Fal

          Hi Connor,

           

          An alternative to the conditional calc you've using

          could be making a 4-column table from your calc

          and blending it to your datasource.

           

          It could be possible only if your [Risk Rating],

          [Market] and [Box Color] are Dimensions.

          Moreover, the two values for [Market] should be

          'High' and 'Other' -- to use an equality (==) for a blend.

           

          As for the processing speed, it depends on many factors,

          and your IF ... ELSEIF .... calculation could have an impact

          (as well as a blend).

           

          Yours,

          Yuri