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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
DAXNewby
Regular Visitor

DAX Percentage Range

I'm new to DAX so any help would be greatly appreciated. I have created the Dax formula below. It works but doesn't include anyone that's attendance is exactly 93%. It is excluding these from the table. I cannot see what is wrong with the DAX measure. The measure needs to display any student on or above 90% and less than or equal to 93%.

 

Statistical Attendance Presence Below Target % =
// displays attendance for students on or above 90% and less than or equal to 93%
IF(
    'MIS: Attendance'[Statistical Attendance Presence %] >= 0.90 && 'MIS: Attendance'[Statistical Attendance Presence %] <= 0.93,
    'MIS: Attendance'[Statistical Attendance Presence %]
    )
1 ACCEPTED SOLUTION

Yes, there's a difference between the actual underlying numerical value and the way it's displayed (Format). 

It sounds like you need to round the value to the nearest 0.0001 before displaying it in the chart.

here's the ROUND function, and an example of what the measure or new column should look like.  All you need to do is put in the integer corresponding to how many digits after the decimal point you want to round, (sounds like 4 is the right number for you, 4 places after the decimal).

https://learn.microsoft.com/en-us/dax/round-function-dax

Statistical Attendance Presence Below Target % =

var attendance = ROUND('MIS: Attendance'[Statistical Attendance Presence %] , <put integer here>)
return
IF(attendance >= 0.90 && attendance <= 0.93, attendance, BLANK())


//Mediocre Power BI Advice, but it's free//

View solution in original post

4 REPLIES 4
DAXNewby
Regular Visitor

Thanks for your reply. I've double-checked and the figure is a percentage at 2 decimal places.  The actual value for a student in the table is 93.001345895, but because i only want 2 decimal places it should show this record in the table as it equals 93%. Am I missing something simple? I have even tried removing the measure and using the filter's visual panel to see if that filter works, but it is doing exactly the same.

Yes, there's a difference between the actual underlying numerical value and the way it's displayed (Format). 

It sounds like you need to round the value to the nearest 0.0001 before displaying it in the chart.

here's the ROUND function, and an example of what the measure or new column should look like.  All you need to do is put in the integer corresponding to how many digits after the decimal point you want to round, (sounds like 4 is the right number for you, 4 places after the decimal).

https://learn.microsoft.com/en-us/dax/round-function-dax

Statistical Attendance Presence Below Target % =

var attendance = ROUND('MIS: Attendance'[Statistical Attendance Presence %] , <put integer here>)
return
IF(attendance >= 0.90 && attendance <= 0.93, attendance, BLANK())


//Mediocre Power BI Advice, but it's free//

I tried your solution this morning and it worked!!! I'm so grateful for your response. It was driving me mad and I couldn't see what I had done. A massive thank you once again.

kpost
Super User
Super User

Is is possible that the % value is being displayed as a whole number even though it's actually a decimal?

So your table would display somebody's attendance as 93%, but perhaps it's actually 93.1% and therefore should be excluded?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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