Forum Discussion

GKs's avatar
GKs
Frequent Visitor
7 years ago
Solved

Calculate and Divide Together

I am really a beginner with this tool, I am trying to make this calculation with DAX, however it does not show how I would like it.

 

 

 

I know something is wrong, I can not find that 

 

6 Replies

    • GKs's avatar
      GKs
      Frequent Visitor

      replicate the same formula and only divide the red / red, the other values are infinity

      • affan's avatar
        affan
        Solution Sage

        Anonymous

         

        Have you tried downloading and checking the sample file I have shared?

  • Hi GKs,

     

    Add the following measure to your data model:

     

    % = 
    var Red_sales = CALCULATE(SUM(Sales[Sales]);Sales[Group] = "Red")
    Return
     SUM(Sales[Sales]) / Red_sales

    Should give you the expected result

     

    Regards,

    MFelix