Forum Discussion
Calculation Group and SelectedValue
- 1 year ago
Calculation group logic is only applied once per measure, so statements like
VAR _Value = CALCULATE( SELECTEDMEASURE(), CG_TimeIntelligence[Name] = "MTD PY" )won't work.
What you could do is to create a separate calculation group for labels, which would then be able to call the time intelligence calculation items. You could have the calculation item return a numeric value for the variance, which you would then be able to detect in conditional formatting, and use the format string property of the label calculation item to return the formatted string using the exact code you already have in the Label calculation item you posted.
Calculation group logic is only applied once per measure, so statements like
VAR _Value = CALCULATE( SELECTEDMEASURE(), CG_TimeIntelligence[Name] = "MTD PY" )
won't work.
What you could do is to create a separate calculation group for labels, which would then be able to call the time intelligence calculation items. You could have the calculation item return a numeric value for the variance, which you would then be able to detect in conditional formatting, and use the format string property of the label calculation item to return the formatted string using the exact code you already have in the Label calculation item you posted.