Forum Discussion

kmansweden2017's avatar
kmansweden2017
Frequent Visitor
3 years ago
Solved

Filter factTable with two combinded columns

Hi, I am struggling and starting to think there isnt a straight forward way to filter this table the way i need. I want to display and count the rows left after I filter out rows that has "Vehic...
  • johnt75's avatar
    3 years ago

    You could try

    Vehicle stock ( filtered ) = 
    VAR FilteredRows = CALCULATETABLE(
    	VALUES( 'FactVehicleStock'[VehicleNumber] ),
    	FactVehicleStock[TotalBookValue] = 0  && FactVehicleStock[VehicleStatusCode] = 23
    )
    RETURN CALCULATE(
    	COUNTROWS('FactVehicleStock'),
    	EXCEPT( VALUES('FactVehicleStock'[VehicleNumber]), FilteredRows)
    )