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
mmowrey
Helper I
Helper I

If less than statement

when i create a less than statment, why does power BI add records to table but the greater than statment works fine?

 

Below Goal =
IF([Projection Accuracy 2] > .85, 1,0)
4 ACCEPTED SOLUTIONS
jdbuchanan71
Super User
Super User

Because you have rows where the value of [Projection Accuracy 2] is blank and PowerBI sees blank as < .08 so it gives you a 0.  You can change it to only return if [Projection Accuracy 2] is not blank.

Below Goal = 
VAR _ProjAcc = [Projection Accuracy 2]
RETURN
IF ( NOT ISBLANK ( _ProjAcc ), IF( _ProjAcc > .85, 1,0 ) )

View solution in original post

Anonymous
Not applicable

Hi @mmowrey ,

 

You could use SUMX() function.

https://docs.microsoft.com/en-us/dax/sumx-function-dax 

For example:

measure = sumx('table',[Below Goal])

 

Best Regards,

Jay

View solution in original post

thanks so much .. this all worked.. one last question :)..   when i take sum then divide by another number why would it come up as 0

 

mmowrey_0-1656423443064.png

 

Below Goal divided by Count of DriveID =
DIVIDE([Below Goal Sum],COUNT(BloodDrive[DriveID]))

View solution in original post

Anonymous
Not applicable

@mmowrey , 7 / 18 = 0.3888. If your measure [Below Goal divided by Count of DriveID] is formatted as Whole Number or to 0 decimal places, then it will display as zero.

 

EylesIT_0-1656433026551.png

 

View solution in original post

7 REPLIES 7
jdbuchanan71
Super User
Super User

Is it because of rounding?  7/18 = 0.388889

jdbuchanan71
Super User
Super User

I'm going to need more information about the structure of your data to answer that question.  Take a look at this post that outlines what we need to help answer your questions.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/td-p/1447523

 

jdbuchanan71
Super User
Super User

Because you have rows where the value of [Projection Accuracy 2] is blank and PowerBI sees blank as < .08 so it gives you a 0.  You can change it to only return if [Projection Accuracy 2] is not blank.

Below Goal = 
VAR _ProjAcc = [Projection Accuracy 2]
RETURN
IF ( NOT ISBLANK ( _ProjAcc ), IF( _ProjAcc > .85, 1,0 ) )

thanks.. that worked.. how do i sum this formula to get a count?

Anonymous
Not applicable

Hi @mmowrey ,

 

You could use SUMX() function.

https://docs.microsoft.com/en-us/dax/sumx-function-dax 

For example:

measure = sumx('table',[Below Goal])

 

Best Regards,

Jay

thanks so much .. this all worked.. one last question :)..   when i take sum then divide by another number why would it come up as 0

 

mmowrey_0-1656423443064.png

 

Below Goal divided by Count of DriveID =
DIVIDE([Below Goal Sum],COUNT(BloodDrive[DriveID]))
Anonymous
Not applicable

@mmowrey , 7 / 18 = 0.3888. If your measure [Below Goal divided by Count of DriveID] is formatted as Whole Number or to 0 decimal places, then it will display as zero.

 

EylesIT_0-1656433026551.png

 

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