Forum Discussion
Anonymous
4 years agoNot applicable
Dynamic ALLEXCEPT based on selected slicers.
I have a measure with ALLEXCEPT DAX command for count the quantity of orders per equipment category. But it is static, but in order to have a real count depending of the selection in the slicers in n...
- 4 years ago
Hi Anonymous
This should workQuantity of orders per Category = VAR SelectedDates = ALLSELECTED ( 'Table'[Date] ) RETURN CALCULATE ( COUNTROWS ( 'Table' ), REMOVEFILTERS ( ), VALUES ( 'Table'[Category] ), SelectedDates )
littlemojopuppy
Community Champion
4 years agoHi Anonymous the reason it's not changing is because ALLEXCEPT() only includes Category as a field to ignore filters.
But I'm thinking you might be overcomplicating this...have you tried just simply COUNT(Table[Order]) as your measure? That would take into account filter context for Category, Date, Country, or whatever other filters are applied. If you did, what happened?
- Anonymous4 years agoNot applicable
Thanks for your answer littlemojopuppy
If I just make a simply COUNT(Table[Order]), the measure is going to count the amount of orders by equipment but not by category. In the example the table is going to be something like:Category: Trucks Quantity of orders per Category: 10 Truck 1 4 Truck 2 2 Truck 3 1 Truck 4 3 Category: Mixers Quantity of orders per Category: 15 Mixer 1 9 Mixer 2 6 Thanks
- littlemojopuppy4 years ago
Community Champion
Anonymous can you provide some sample data to work with?