Forum Discussion
speedramps
2 years agoSuper User
How to apply conditional colour formatting to Calculation Groups dynamically with Field Parameters?
How to apply conditional colour formatting to Calculation Groups dynamically with Field Parameters?
Please only reply if you know the answer.
Click here to see example PBIX
It has a Field ...
- 2 years ago
speedrampsPlease use the below measure in the matrix value section instead of field parameter.
Color Measure =VAR _selectedValue = SELECTEDVALUE('Calculation group'[Calculation item])RETURNSWITCH (TRUE(),_selectedValue IN {"PY", "TY","YoY","YoY%"} && MAX('Field parameter'[Parameter Name]) = "Units", [Units],_selectedValue IN {"PY", "TY","YoY","YoY%"} && MAX('Field parameter'[Parameter Name]) = "Value", [Value],_selectedValue IN {"PY", "TY","YoY","YoY%"} && MAX('Field parameter'[Parameter Name]) = "Packaging", [Packaging],_selectedValue IN {"PY", "TY","YoY","YoY%"} && MAX('Field parameter'[Parameter Name]) = "Products", [Products],BLANK() // Default case (no selection))
and then set the conditional formatting as the given picture by right clicking on the color measure. And you are done..Hope this help!!
If this post solved your problem, please mark it as a solution!!
shafiz_p
2 years agoSuper User
speedrampsPlease use the below measure in the matrix value section instead of field parameter.
Color Measure =
VAR _selectedValue = SELECTEDVALUE('Calculation group'[Calculation item])
RETURN
SWITCH (
TRUE(),
_selectedValue IN {"PY", "TY","YoY","YoY%"} && MAX('Field parameter'[Parameter Name]) = "Units", [Units],
_selectedValue IN {"PY", "TY","YoY","YoY%"} && MAX('Field parameter'[Parameter Name]) = "Value", [Value],
_selectedValue IN {"PY", "TY","YoY","YoY%"} && MAX('Field parameter'[Parameter Name]) = "Packaging", [Packaging],
_selectedValue IN {"PY", "TY","YoY","YoY%"} && MAX('Field parameter'[Parameter Name]) = "Products", [Products],
BLANK() // Default case (no selection)
)
and then set the conditional formatting as the given picture by right clicking on the color measure. And you are done..
and then set the conditional formatting as the given picture by right clicking on the color measure. And you are done..
Hope this help!!
If this post solved your problem, please mark it as a solution!!
anamika_singh
1 year agoFrequent Visitor
Hello,
This is a good workaround, however it din't work when i selected multiple measures in the field parameter. It works for single measure selected from the field parameter at a time. Any suggestions on how to fix this issue?
Thanks,
Anamika