Loading

Displaying a Different Measure Based on Hierarchy Drill Level

Publiceringsdatum: Apr 21, 2025
Uppgift

How to change which measure is displayed based on the level where the user has drilled into the hierarchy.
This can be adjusted to display any measure.

Steg

Use a calculated field similar to the following:

IF MIN([Hierarchy Level 3]) = MAX([Hierarchy Level 3]) 
THEN [Measure 3] 
ELSEIF MIN([Hierarchy Level 2]) = MAX([Hierarchy Level 2]) 
THEN [Measure 2] ELSE [Measure 1] 
END

On the workbook, there is the example "Display Result With Description"

IF MIN([Item]) = MAX([Item]) THEN "Displaying Item SALES: " + STR(ROUND(SUM(Sales),2)) //This will display the text and sum of Sales for the item - It is also rounding the result to show 2 decimal digits.
ELSEIF MIN([Category]) = MAX([Category]) THEN "Displaying Category PROFIT: " + STR(ROUND(SUM(Profit),2)) //This will display the text and sum of Profit for the Category
ELSEIF MIN([Department]) = MAX([Department]) THEN "Displaying Department PROFIT: " + STR(ROUND(SUM(Profit),2)) //This will display the text and sum of Profit for the Department
END

 

Knowledge-artikelnummer

001458310

Bilagor

Example Display by Hierarchy-V2025.1.twbx

1492 KB

 
Laddar
Salesforce Help | Article