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
Anonymous
Not applicable

Help with conditional statement

KPI = IF([Projected Monthly Growth %]<[Progress towards CY Goal] ,0,1) .
I'm trying to compare two measures and based on the value I want to conditionally format my KPI . However Its not returning the correct results. Any Help is appreciated
5 REPLIES 5
amitchandak
Super User
Super User

@Anonymous , if the total is not correct then you need to use summarizes or values to get the correct GT

 

example

 

sumx(values(Table[Category]), IF([Projected Monthly Growth %]<[Progress towards CY Goal] ,0,1) )

 

why grand total is wrong

https://www.youtube.com/watch?v=ufHOOLdi_jk

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

The totals are fine , but the if condition is failing , my condition is if 25 < 28 , then 0 else it should be 1 but im getting 1 as the value

 

Hi @Anonymous ,

 

This has to do with the return values of your two measures [Projected Monthly Growth %] and [Progress towards CY Goal]. You can put these two measures on two cards and see if they are 25 and 28.

 

You can also share the formulas of these measures and your sample data, which will help us quickly understand what the problem is.

 

Best Regards,
Winniz

Anonymous
Not applicable

Hi , My measures are returning the correct values when shown on cards or in a table . the only place where its failing is the evaluation of the IF condition .  

Hi @Anonymous ,

 

I could not reproduce the issue, could you please share your PBIX file that doesn't contain sensitive data?

 

Best Regards,
Winniz

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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