Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

help with DIVIDE measure

Hi all,   How can I divide the total sum of costs from a fact table, on each product Id from a dimension table?   The products will have different sum of costs, and I want to divide that value on...
  • rajulshah's avatar
    6 years ago

    Hello Anonymous ,

     

    You can create a measure for the Total Sales as below:

    Total Sales = CALCULATE(SUM([Sales[Sales]),ALL(Product_Dim_table[Product]))

    Sales by Product = SUM([Sales[Sales]) 

     

    and then use create a measure for division:
    DIVIDE([Sales by Product],[Total Sales])

     

    Hope this helps.