Forum Discussion
BSM1985
Helper IV
5 years agoDecomposition Conditional Formatting
Hi Team, I have decomposition tree with 3 levels as shown below. Requirement: In this hierarchy, I would need: 1. All 'Yes' nodes in Blue color 2. Level A node 'No' should be in Black 3. Level B...
- 5 years ago
Hi BSM1985 ,
Try to add the following custom measure:
Measure = SWITCH( TRUE(); SELECTEDVALUE(Testing[A]) = "NO";"Black"; SELECTEDVALUE(Testing[B]) = "NO";"#FFC200"; SELECTEDVALUE(Testing[C]) = "NO";"Grey" )You can also change the Black and Grey to other custom colour codes just remember to place the # before the code.
Check PBIX file attach.
MFelix
Super User
5 years agoHi BSM1985 ,
Try to add the following custom measure:
Measure = SWITCH(
TRUE();
SELECTEDVALUE(Testing[A]) = "NO";"Black";
SELECTEDVALUE(Testing[B]) = "NO";"#FFC200";
SELECTEDVALUE(Testing[C]) = "NO";"Grey"
)
You can also change the Black and Grey to other custom colour codes just remember to place the # before the code.
Check PBIX file attach.
- BSM19855 years ago
Helper IV
Sorry MFelix
I was not clear. This works for one node, not for all as shown below. I would need different color for each 'No' for each node as shown in below screenshot.
- MFelix5 years ago
Super User
Hi BSM1985 ,
Believe that has to do with the order of the function try:
Measure = SWITCH ( TRUE (); SELECTEDVALUE ( Testing[C] ) = "NO"; "Grey"; SELECTEDVALUE ( Testing[C] ) = "Yes"; "Blue"; SELECTEDVALUE ( Testing[B] ) = "NO"; "#FFC200"; SELECTEDVALUE ( Testing[B] ) = "Yes"; "Blue"; SELECTEDVALUE ( Testing[A] ) = "No"; "Black"; SELECTEDVALUE ( Testing[A] ) = "Yes"; "Blue" )