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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
AstaBr
Helper II
Helper II

How to create a measure or a DAX formula to get only figures from the column that are above 5%

Hi, we need to get projects that have a variance to plan over 5% or £100k colored in red. Enything up till that figure (including £0) should not have color. The colomn we need to work with is the '2024/2025 Variance from plan' from the Project list data set.

PowerBI 5%.PNG 

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @AstaBr ,

 

Is your requirement a conditional formatting of the planned values based on the percentage obtained by subtracting the planned values from the predicted values, if I understand correctly, here are my steps:

1.Create simple data:

vlinhuizhmsft_0-1725417875106.png

 

2.Create a measure and use it for conditional formatting, you can make some adjustments according to your needs.

Measure = 
VAR _divide=DIVIDE(MAX('Project list'[2024/2025 Variance from plan]),MAX('Project list'[2024/2025 Planned detailed financials]))
RETURN 
IF(_divide<-0.05,1,IF(_divide>-0.05&&_divide<=0,0))

 

3.Background color settings:

vlinhuizhmsft_1-1725418070359.png

vlinhuizhmsft_3-1725418144102.png

4.The final result is as follows:

vlinhuizhmsft_4-1725418232721.png

 

Best Regards,
Zhu

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

View solution in original post

Anonymous
Not applicable

Hi @AstaBr ,

 

I tried to add a row where the data is positive, but the result is correct:

vlinhuizhmsft_0-1725959571046.png

Can you try the following code to equalize the remaining cases to 2:

Measure = 
VAR _divide = DIVIDE(MAX('Project list'[2024/2025 Variance from plan]), MAX('Project list'[2024/2025 Planned detailed financials]))
RETURN 
IF(_divide <= -0.05, 1, IF(_divide > -0.05 && _divide <= 0, 0, 2))

 

There's also a possibility that you're applying multiple conditional formats to the column, causing a prioritization issue.

vlinhuizhmsft_1-1725959971360.png

 

Best Regards,
Zhu
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @AstaBr ,

 

Is your requirement a conditional formatting of the planned values based on the percentage obtained by subtracting the planned values from the predicted values, if I understand correctly, here are my steps:

1.Create simple data:

vlinhuizhmsft_0-1725417875106.png

 

2.Create a measure and use it for conditional formatting, you can make some adjustments according to your needs.

Measure = 
VAR _divide=DIVIDE(MAX('Project list'[2024/2025 Variance from plan]),MAX('Project list'[2024/2025 Planned detailed financials]))
RETURN 
IF(_divide<-0.05,1,IF(_divide>-0.05&&_divide<=0,0))

 

3.Background color settings:

vlinhuizhmsft_1-1725418070359.png

vlinhuizhmsft_3-1725418144102.png

4.The final result is as follows:

vlinhuizhmsft_4-1725418232721.png

 

Best Regards,
Zhu

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

Hi @Anonymous 

thank you a lot for the above formula, however, i just noticed that the positive figures are also coloured which shouldn't be. Please could you recheck the created measure for me.
PowerBI to edit.PNG

 

 

Anonymous
Not applicable

Hi @AstaBr ,

 

I tried to add a row where the data is positive, but the result is correct:

vlinhuizhmsft_0-1725959571046.png

Can you try the following code to equalize the remaining cases to 2:

Measure = 
VAR _divide = DIVIDE(MAX('Project list'[2024/2025 Variance from plan]), MAX('Project list'[2024/2025 Planned detailed financials]))
RETURN 
IF(_divide <= -0.05, 1, IF(_divide > -0.05 && _divide <= 0, 0, 2))

 

There's also a possibility that you're applying multiple conditional formats to the column, causing a prioritization issue.

vlinhuizhmsft_1-1725959971360.png

 

Best Regards,
Zhu
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

Amaizing thank you so much.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors