Forum Discussion
curiouspbix0
5 years agoHelper IV
Dax Aggregation Issue
Hello Daxers, Running into an aggregation here, first table shows raw data, second table is the dax measure which computes correctly when Status column is not used in the table. Actual is s...
- Anonymous5 years ago
Hi curiouspbix0 ,
You can create a measure as below:
Actual = CALCULATE ( SUM ( 'TableVehicle'[Vehicle Count] ), FILTER ( 'TableVehicle', 'TableVehicle'[Status] IN { "Running", "Active" } ) )Best Regards
amitchandak
5 years agoSuper User
curiouspbix0 , remove all and try
Actual = COUNTROWS(DISTINCT(TableVehicle[VehicleID]))
,FILTER((TableVehicle)
,TableVehicle[VehicleStatus] in{"Running","Active"})
)
or
with allselected
Actual = COUNTROWS(DISTINCT(TableVehicle[VehicleID]))
,FILTER(allselected(TableVehicle)
,TableVehicle[VehicleStatus] in{"Running","Active"})
)
- curiouspbix05 years agoHelper IV
ALLSELECTED did not work and cannot remove ALL together on Filter condition.