Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Percent total not correct

Hello All,

I am on version 8.5. I can't get this calculation to work correctly in a pivot table.

Sum(amount)/Sum(ALL amount) I also tried replacing ALL with TOTAL.

What i want is somthing that looks like this

Class

DateCycle

09-28-2009

09-21-2009

09-14-2009

09-08-2009

Cons

30%

32%

29%

30%

Other

70%

68%

71%

70%

Total

100%

100%

100%

100%



What it is doing is ignoring the Class and Date breakdown and giving the percent of the full total.

Class

DateCycle

09-28-2009

09-21-2009

09-14-2009

09-08-2009

Cons

2.63%

2.52%

2.76%

2.58%

Other

26.89%

23.44%

21.11%

18.07%

Total

29.52%

25.96%

23.87%

20.65%

100.00%



The Class is an if statement if(class = 'CONS', 'Cons', 'Other')

The strange thing about it is that I took a training class last week and made the same calculation and it worked, the only difference is the class was with version 9

Thanks in Advance for any help.

Tom

4 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

try this:

sum(amount)/sum(total <DateCycle> amount)

Ask me about Qlik Sense Expert Class!
Not applicable
Author

Oleg,

Thanks! Worked perfect.

Tom

Not applicable
Author

I spoke to soon. It works when the roll up is by month. When it is by week, it does not.

By Week Day
CLASSDateCycle09-28-200909-21-200909-14-200909-08-2009
Cons2.63%2.52%2.76%2.58%
Other26.89%23.44%21.11%18.07%
Total29.52%25.96%23.87%20.65%
By Month
CLASSDateCycleOctSep
Cons8.92%11.15%
Other91.08%88.85%
Total11
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

the field name after the keyword "TOTAL" should correspond to your dimension - wither a date, or a month or a week. If you use a dimension Group, try using Group name after the "TOTAL", it might work (I haven't tested it). If it doesn't work, you might have to give up on using a group.

Ask me about Qlik Sense Expert Class!