Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
MiteshY
Frequent Visitor

Custom Conditional Formatting based on user selection.

Hello Everyone, 

 

I am working on a dashboard which requires to change conditional formatting based on user input. 

 

For eg.

 

There is a target and conditional formatting is done on it based on 

 

Minimum value to 90% down arrow

90% to 100% horizontal arrow

Above 100% up arrow.

 

Now the user wants that the conditional formatting of target should change based on his selection for eg.

 

If the user wants to change target % from 

Minimum to 80% then arrow should change like

 

Minimum to 80% down arrow,

80% to 100% horizontal arrow

Above 100% up arrow.

 

Please help..

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @MiteshY ,

 

Firstly, I suggest you to create a percentage slicer by What if Parameter. Then use between option for that slicer. Here I suggest you to use whole number in what if parameter as below. If you use increment 0.01 and range from 1 to 1.2, Power BI will return incorrect result.

RicoZhou_2-1675671365924.png

 

RicoZhou_1-1675671332665.png

Measure:

Measure = 
VAR _RangeStart = MIN(Parameter[Parameter])/100
VAR _RangeEnd = MAX(Parameter[Parameter])/100
VAR _Percentage =CALCULATE(SUM('Table'[Value]))
RETURN
IF(_Percentage <=_RangeStart,-1,IF(_Percentage>_RangeEnd,1,0))

Finally, you can use conditional formatting in cell elements and set as below.

RicoZhou_3-1675671480801.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @MiteshY ,

 

Firstly, I suggest you to create a percentage slicer by What if Parameter. Then use between option for that slicer. Here I suggest you to use whole number in what if parameter as below. If you use increment 0.01 and range from 1 to 1.2, Power BI will return incorrect result.

RicoZhou_2-1675671365924.png

 

RicoZhou_1-1675671332665.png

Measure:

Measure = 
VAR _RangeStart = MIN(Parameter[Parameter])/100
VAR _RangeEnd = MAX(Parameter[Parameter])/100
VAR _Percentage =CALCULATE(SUM('Table'[Value]))
RETURN
IF(_Percentage <=_RangeStart,-1,IF(_Percentage>_RangeEnd,1,0))

Finally, you can use conditional formatting in cell elements and set as below.

RicoZhou_3-1675671480801.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Thank You so much.. @Anonymous it worked for me, just by modifying your logic i am able to get the desired result.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.