Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Multiple Table.Pivot using M or Power Query Editor ?

Hi everyone,   I just discover the Table.Pivot of the Power Query Editor. Do you know if is it possible to do a multiple pivot <-> multiple value as you can do with Excel ?   I have 5 columns : d...
  • v-juanli-msft's avatar
    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
    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.