Forum Discussion
Multiple Table.Pivot using M or Power Query Editor ?
- 7 years ago
Hi Anonymous
To get total per product per country,
Create a new measure
Measure = CALCULATE ( SUM ( Sheet3[unit sales] ), ALLEXCEPT ( Sheet3, Sheet3[country], Sheet3[product] ) ) * CALCULATE ( SUM ( Sheet3[amount] ), ALLEXCEPT ( Sheet3, Sheet3[country], Sheet3[product] ) )Best Regards
MaggieCommunity Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous
To get total per product per country,
Create a new measure
Measure =
CALCULATE (
SUM ( Sheet3[unit sales] ),
ALLEXCEPT ( Sheet3, Sheet3[country], Sheet3[product] )
)
* CALCULATE (
SUM ( Sheet3[amount] ),
ALLEXCEPT ( Sheet3, Sheet3[country], Sheet3[product] )
)
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous7 years agoNot applicable
Hi Maggie,
Thanks you for your answer! I didn't know the AllExcept() formula, it works very well to get the total (I just don't need to make the product [unit sales]x[amount] cause the amount column is already a total)
Does someone have an idea about my multiple pivot issue ?
Thanks,
Baptiste
- v-juanli-msft7 years ago
Community Support
Hi Anonymous
ALLEXCEPT is a DAX function which removes all context filters in the table except filters that have been applied to the specified columns.
Learn from this link:
https://docs.microsoft.com/en-us/dax/allexcept-function-dax
I'm not clear about your scenario but willing to help.
Could you show an example data and expect output?
Best Regards
Maggie