Forum Discussion

TaroGulati's avatar
TaroGulati
Icon for Helper III rankHelper III
4 years ago
Solved

Value Grand total

Hi guys,

 

i am having a small calculation issue for the percentage on grand total values.

 

I have a table where one "category" is blank as you can see on the left table. I have created a measure which should give me percentage on the total value. issue is that once i am removing blank from category by using filter it is still showing the same result. I was expecting the result for value1 = 12/42 =  28,57% in the table on the right but it is still doing 12/52 = 23,08%. 

my measure is this :- 

measure = DIVIDE(SUM(Sheet1[Value]),CALCULATE(SUM(Sheet1[Value]),ALL(Sheet1[Category])))
 
I am not able to find where i am making mistake. 
 
can you help me to find the solution please?
 
Thanks in advance.
 
stay safe.
  • TaroGulati , Try allselected in place of all and check

    measure = DIVIDE(SUM(Sheet1[Value]),CALCULATE(SUM(Sheet1[Value]),allselected (Sheet1[Category])))

2 Replies

  • TaroGulati , Try allselected in place of all and check

    measure = DIVIDE(SUM(Sheet1[Value]),CALCULATE(SUM(Sheet1[Value]),allselected (Sheet1[Category])))

    • TaroGulati's avatar
      TaroGulati
      Icon for Helper III rankHelper III

      Yes, now it is working. thanks.