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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Owensj241
Frequent Visitor

Creating a Measure to Identify How Many Vehicles are Overmileage

I need to create a measure that allows me to identify how many vehicles in a report are over mileage. 

 

I also need to to be able to identify the # of overmileage vehicles by division.

 

Can someone assist with the formula I would need to use?

 

Thanks

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@Owensj241 Would need sample data but should look something like the following:

Measure =
  VAR __Over = 200000 //whatever overmileage is
  VAR __Table = FILTER( 'Table', [mileage] > __Over )
  VAR __Result = COUNTROWS( __Table )
RETURN
  __Result


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

5 REPLIES 5
v-kathullac
Community Support
Community Support

Hi @Owensj241 ,

 

We wanted to kindly follow up to check if the solution provided by the super user resolved your issue? or let us know if you need any further assistance.

 

Thanks

Thanks for your help!  It worked.

Owensj241
Frequent Visitor

OdometerManufacturerModelDivision
124292CHEVROLETIMPALASurveillance
251653CHEVROLETSUBURBANSwat
227201CHEVROLETEXPRESS 2500Swat
219570CHEVROLETEXPRESSSwat
216422CHEVROLETTAHOEField
208034CHEVROLETTAHOEField
199035CHEVROLETEXPRESS 2500Field
193810FORDEXPLORERField
191867FORDF-150Field
191500FORDF-150Field
190343FORDEXPLORERK9
189558CHEVROLETSUBURBANSurveillance

@Owensj241 Based on that data, the following measure returns 5:

Measure = 
  VAR __Over = 200000 //whatever overmileage is
  VAR __Table = FILTER( 'Table', [Odometer] > __Over )
  VAR __Result = COUNTROWS( __Table )
RETURN
  __Result


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Greg_Deckler
Community Champion
Community Champion

@Owensj241 Would need sample data but should look something like the following:

Measure =
  VAR __Over = 200000 //whatever overmileage is
  VAR __Table = FILTER( 'Table', [mileage] > __Over )
  VAR __Result = COUNTROWS( __Table )
RETURN
  __Result


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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