Forum Discussion
kc_1116
11 months agoFrequent Visitor
Need help in using Field Parameter in Top N filter and Conditional Formatting
Hi, I have a report that has conditional formatting and Top N filter on a static measure named IRR and it works perfectly. However, I want to change the measure to dynamic and allow user to selec...
- 11 months ago
Hi kc_1116 ,
In order to create conditional formatting for your bar chart, you can create a measure like below:
Selected Metric Value = VAR Selection = SELECTEDVALUE('Metric Selector'[Metric Selector Order]) RETURN SWITCH( Selection, 0, [M_IRR], 1, [M_DPI], 2, [M_RVPI], 3, [M_TVPI], [M_IRR] )Then you can apply conditional color formatting in the bar:
Set the conditional formatting like below:
The resultant output is as shown blow:
I have attached an example pbix file for your reference:
Best regards,
amitchandak
Super User
11 months agokc_1116 , I think the main idea would be to know the selected measure and have conditional formatting based on that . Check if the below method can help
Field Parameters- Conditional Formatting
: https://amitchandak.medium.com/field-parameters-conditional-formatting-517aacc23fdf
Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f