Forum Discussion
groupby / summarize / filter
- 7 years ago
Hi XaverScheu70
In that case, we can add Store Column in the ALLEXCEPT arguments
F1 = CALCULATE ( SUM ( Table1[Stock Qty] ), ALLEXCEPT ( Table1, Table1[Store] ,Table1[Style Key] ) ) F2 = CALCULATE ( SUM ( Table1[Sales Qty] ), ALLEXCEPT ( Table1,Table1[Store], Table1[Style Key] ) )
Here is the documentation of ALLEXCPET function
https://msdn.microsoft.com/en-us/query-bi/dax/allexcept-function-dax
You can use these formulas
F1 = CALCULATE ( SUM ( Table1[Stock Qty] ), ALLEXCEPT ( Table1, Table1[Style Key] ) ) F2 = CALCULATE ( SUM ( Table1[Sales Qty] ), ALLEXCEPT ( Table1, Table1[Style Key] ) )
- XaverScheu707 years agoNew Member
Hi Zubair_Muhammad,
Yes, it works great!!! Thank you.
But how can I do the same with more then one ALLEXCEPT condicion?
Here below in the STORE COLUMN we have an other condition, Barcelona Store.
Madrid Store / 123456 / Black / 1 / 38 / 4 / 125
Madrid Store / 123456 / Grey / 2 / 58 / 4 / 125
Madrid Store / 123456 / White / 1 / 29 / 4 / 125
Madrid Store / 125344 / Black / 1 / 23 / 3 / 66
Madrid Store / 125344 / White / 2 / 43 / 3 / 66
Barcelona Store / 123456 / Black / 3 / 10 / 5 / 20
Barcelona Store / 123456 / White / 2 / 10 / 5 / 20
- Zubair_Muhammad7 years ago
Community Champion
Hi XaverScheu70
In that case, we can add Store Column in the ALLEXCEPT arguments
F1 = CALCULATE ( SUM ( Table1[Stock Qty] ), ALLEXCEPT ( Table1, Table1[Store] ,Table1[Style Key] ) ) F2 = CALCULATE ( SUM ( Table1[Sales Qty] ), ALLEXCEPT ( Table1,Table1[Store], Table1[Style Key] ) )
Here is the documentation of ALLEXCPET function
https://msdn.microsoft.com/en-us/query-bi/dax/allexcept-function-dax
- XaverScheu707 years agoNew Member