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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
cheid_4838
Helper IV
Helper IV

Excluding Data Subset From Measure

I have a table that calculates long idle percentage (long idle time/engine run time).  I want to exclude those drivers that have  driven less than 100 miles per week.  I created a calculation shown below that would calculate the distance by driver and start week, then would calculate the percentage excluding those drivers with less than 100 miles per week.  For example all drivers the week of 12/22 have less than 100 miles.  In the first screenshot it shows a percentage of 19.9%, but in the second when I expand out the drivers there are no perecentages listed which is correct, but I would like to see the results in the first screenshot.   I would also like this logic to be used with a card and guage visual where there are no driver filters.  How can what I created below be modified to exclude drivers with less than 100 miles per week and still calculate the percentage at all hiercharies and regardless of the visual used?  Thanks in advance for your help. 

 

Long Idle Over 100 =
VAR _Distance = CALCULATE(SUM('Long Idle'[Distance]),
ALLEXCEPT('Driver LookUp','Driver LookUp'[DriverFullName]),
ALLEXCEPT(CalendarLookUp,CalendarLookUp[Start of Week]))

VAR _IDLE =  CALCULATE(DIVIDE(sum('Long Idle'[Long Idle Time (Hours)]),sum('Long Idle'[Engine Time (Hours)])))

RETURN
IF(_Distance >100,_IDLE,"")

 

cheid_4838_4-1737487781529.png

 

 

cheid_4838_2-1737487735839.png

 

 

 

2 REPLIES 2
vanessafvg
Community Champion
Community Champion

ideally for these kinds of questions it is better to provide some sample data with an example of your expected result.





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




I can't get anything to post to show you what I am trying to accomplish.  Ultimately I just want to the long idle percentage to be adjusted when the driver has a weekly distance less than 100 miles.  One of the problems I am having is that if there is more than one date as shown in the table below and one of the columns has a mileage less than 100 the entire row is excluded.  I just want that one cell with mileage less than 500 to be excluded and the remaining rows staying within the table.   Below shows the mileage for each driver.  I can't figure out how to exclude the mileage less than 100 without impacting the entire row.

 

cheid_4838_0-1737500570715.png

 

Helpful resources

Announcements
Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.