Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
nareshthavidishetty
Creator III
Creator III

Wrong % total in pivot table

Hi,

Am getting wrong grand total in pivot table.Previously it is good .

Untitled.png

Thanks..

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Could you explain how you got to -7.91% ? Or why do you call -0.012% wrong and -7.91% correct?

It seems to me that you are calculating something like a growth rate per dimension value.

IMHO, I would expect to see in the total line the growth rate calculated from the total aggregates, and not summing up or averaging the growth rate of the dimension lines.

Hence, -0.012% might be correct, at least I don't see an issue with using the expression total here instead of an aggregation-of-rows.

Regards,

Stefan

View solution in original post

4 Replies
sunny_talwar

Can you provide more details? What is the expression you are using? What changed that the totals changed from what was expected? What is the expected output?

nareshthavidishetty
Creator III
Creator III
Author

Hi,

Dimension : =if(KEY3='Appliances' or KEY3='Electronics' or KEY3='Furniture' or  KEY3='Mattress' or                  KEY3='Office',KEY3)

Expression:1

(Sum({<DATE={'$(Vyesterday)'},Indicator={1}>}Dollars)

-

Sum ({<DATE={'$(vDayLY)'},Indicator={1}>} Dollars))

/

Sum ({<DATE={'$(vDayLY)'},Indicator={1}>} Dollars)

Expression:2

(Sum ({<DATE= {">=$(vMonthStart)<=$(Vyesterday)"},Indicator={1}>} Dollars)-Sum ({<DATE= {">=$(vMonthStartLY)<=$(vPrevYesterday)"},Indicator={1}>} Dollars))

/

Sum ({<DATE= {">=$(vMonthStartLY)<=$(vPrevYesterday)"},Indicator={1}>} Dollars)

Desired O/P:

 

2.00%
-11.35%
15.48%
3.17%
-17.21%

                         Total =-7.91%

But it gives -0.012%.

Note: Didn't change any chart properties it working good since log time.

Thanks..

sunny_talwar

Can you try this:

Sum(Aggr((Sum ({<DATE= {">=$(vMonthStart)<=$(Vyesterday)"},Indicator={1}>} Dollars)-Sum ({<DATE= {">=$(vMonthStartLY)<=$(vPrevYesterday)"},Indicator={1}>} Dollars))

/

Sum ({<DATE= {">=$(vMonthStartLY)<=$(vPrevYesterday)"},Indicator={1}>} Dollars), KEY3))

swuehl
MVP
MVP

Could you explain how you got to -7.91% ? Or why do you call -0.012% wrong and -7.91% correct?

It seems to me that you are calculating something like a growth rate per dimension value.

IMHO, I would expect to see in the total line the growth rate calculated from the total aggregates, and not summing up or averaging the growth rate of the dimension lines.

Hence, -0.012% might be correct, at least I don't see an issue with using the expression total here instead of an aggregation-of-rows.

Regards,

Stefan