Forum Discussion

Chrisjm15's avatar
Chrisjm15
Regular Visitor
2 years ago
Solved

Calculating mix with multiple criteria

I have a table in Power Bi Desktop.   The table has 4 columns: Month Channel Category Units I'm trying to create a dynamic calculation to find what mix is of units of Category by Channel by ...
  • rubayatyasmin's avatar
    2 years ago

    Hi, Chrisjm15 

     

    Create 2 calculated column. One for total unit another for mix. Sample DAX,

    Total Units = CALCULATE(SUM('YourTableName'[Units]), ALLEXCEPT('YourTableName', 'YourTableName'[Month], 'YourTableName'[Channel]))

     

    2nd calculated column

     

    Category Mix = 'YourTableName'[Units] / 'YourTableName'[Total Units]