Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Calcullate All/Filter

Hello,

 

I need to create a measure to calculate the % of grand total. Let me explain you what I mean

 

 

 

Product     Amount      Total Sales(Measure I need)         % Grand Total (2nd Measure needed)   

 

A               100                            200

B                 75                            200

C                 25                            200

 

Total = 200

 

This data example is not filtered by any field. What I need is the "200" changes depending on the filters applied, so i can get the % total for every field (either by supervisor, country, department, etc.)

 

Thanks

 

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous 

    To get the grand total, you would do something like this:

    Total Sales = 
    Calculate(
        SUM('YourTable'[Amount]),
        ALL('YourTable')
    )

    Then, to get the % of the total, you can do:

    % Grand Total = 
    DIVIDE(
        SUM('YourTable'[Amount]),
        [Total Sales]
    )

     

    I hope this helps. If it does, please Mark as a solution.
    I also appreciate Kudos.
    Nathan Peterson
    • Anonymous's avatar
      Anonymous
      Not applicable

      Anonymous  Hey, i already tried that but what it gives me is the TOTAL amount of calls (in my case is around 100,000) So, it will divide the amount of calls per agent by the TOTAL 100,000 calls, and that's not what I need, what I need is to have that amount filtered by agent or sup or country, instead of the 100,000 i need for example the total calls per AGENT, idk if that makes sense