Forum Discussion
speedramps
Super User
2 years agoHow 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
Super User
2 years agospeedrampsPlease 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!!
- speedramps2 years ago
Super User
Thank you shafiz_p
I will accept that as a solution but leaving the ticket open for more answers.
Many thanks an well done !
- anamika_singh1 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