Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Share within a segment

I'm struggeling to find the right dax code to calculate a share of manufacturer within a category. See example below of my matrix table:

 

 

I have a Dim table with manufacturers linked to brands and categories.

 

My current code gives me a result of 100% on every single line:

Company total share mat = CALCULATE('Sales data total'[MAT Value])/CALCULATE('Sales data total'[MAT Value],FILTER(category_All_Categories_sales_r,category_All_Categories_sales_r[Category]<> BLANK()))

3 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Expected results would be that the last column is a calculation of mat value by row devided by the total sum in bold. So after column 403.130 there should be 0.029 (instead of 1)