Forum Discussion
Owensj241
1 year agoFrequent 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
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
5 Replies
- Greg_Deckler
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 - Owensj241Frequent Visitor
Odometer Manufacturer Model Division 124292 CHEVROLET IMPALA Surveillance 251653 CHEVROLET SUBURBAN Swat 227201 CHEVROLET EXPRESS 2500 Swat 219570 CHEVROLET EXPRESS Swat 216422 CHEVROLET TAHOE Field 208034 CHEVROLET TAHOE Field 199035 CHEVROLET EXPRESS 2500 Field 193810 FORD EXPLORER Field 191867 FORD F-150 Field 191500 FORD F-150 Field 190343 FORD EXPLORER K9 189558 CHEVROLET SUBURBAN Surveillance - Greg_Deckler
Community Champion
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
- v-kathullac
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
- Owensj241Frequent Visitor
Thanks for your help! It worked.