Forum Discussion
Conditional formatting using multiple calculation groups
- 1 month ago
Drive the color from a dedicated measure that checks the current Time Intelligence calculation item and returns BLANK() for the ones you do not want to color. In a matrix the color measure is evaluated once per column, so returning BLANK() effectively turns formatting off for those columns while it still applies where you return a color.
Variation Color = VAR CurrentItem = SELECTEDVALUE ( 'Time Intelligence'[Name] ) VAR Val = [generic_measure] RETURN SWITCH ( TRUE(), CurrentItem IN { "Variation1", "Variation2" } && Val > 0, "#2E7D32", CurrentItem IN { "Variation1", "Variation2" } && Val < 0, "#C62828", BLANK() )Then on generic_measure open Conditional formatting, choose Background color or Font color, pick Format by: Field value and select Variation Color. Adjust the column name inside SELECTEDVALUE to match the actual column of your Time Intelligence calculation group. The second calculation group keeps working because the color measure references [generic_measure], which resolves under whatever that group dictates.
If it solved your issue, please mark it as the accepted solution and give it a kudos.
Best regards,
Shai Karmani
Drive the color from a dedicated measure that checks the current Time Intelligence calculation item and returns BLANK() for the ones you do not want to color. In a matrix the color measure is evaluated once per column, so returning BLANK() effectively turns formatting off for those columns while it still applies where you return a color.
Variation Color =
VAR CurrentItem = SELECTEDVALUE ( 'Time Intelligence'[Name] )
VAR Val = [generic_measure]
RETURN
SWITCH (
TRUE(),
CurrentItem IN { "Variation1", "Variation2" } && Val > 0, "#2E7D32",
CurrentItem IN { "Variation1", "Variation2" } && Val < 0, "#C62828",
BLANK()
)
Then on generic_measure open Conditional formatting, choose Background color or Font color, pick Format by: Field value and select Variation Color. Adjust the column name inside SELECTEDVALUE to match the actual column of your Time Intelligence calculation group. The second calculation group keeps working because the color measure references [generic_measure], which resolves under whatever that group dictates.
If it solved your issue, please mark it as the accepted solution and give it a kudos.
Best regards,
Shai Karmani