Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Solved! Go to Solution.
@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
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.
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 |
@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
@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
User | Count |
---|---|
25 | |
11 | |
8 | |
7 | |
6 |
User | Count |
---|---|
25 | |
13 | |
12 | |
10 | |
6 |