Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
saniyask
Creator
Creator

Dicrepancy in Total of Pivot table

Hi,

I have a chart where the Sum of values(non zeros) or sum of line items is 200 whereas i am getting the total sum as 210, how shall i rectify or trouble shoot this issue??

Note:-- It is a Pivot table ,there are no filters or selections or triggers applied on the chart and the value of the expression in text box also evaluates to 250 and not 200.

I am attaching an excel file for your better understanding.(Data of the entire chart is copied to the table)

Regards,

Saniya

1 Solution

Accepted Solutions
sunny_talwar

What is the name of your dimension? I think all you need is to do this

Sum(Aggr(If(Sum(Sales) > 0, Count(DISTINCT Customer)), DimesnionName))

Replace DimensionName with the name of the dimension you have in your table....

View solution in original post

6 Replies
marcus_sommer

Try something like this as chart-expression:

sum(aggr(YourExpression, Employee, Date))

- Marcus

saniyask
Creator
Creator
Author

Hi Marcus,

I have tried aggr function its not working for this error.

Regards,

Saniya

sunny_talwar

Would you be able to share a sample where Aggr() isn't working as Marcus prescribed?

Preparing examples for Upload - Reduction and Data Scrambling

Uploading a Sample

saniyask
Creator
Creator
Author

Hi,

Sorry for the delay in response.

I have one single dimension and I am using the expression as if(Sum(Sales)>0,Count(Distinct Customer)) this gives me the correct data as per the line items i.e (386) but the total comes to (457).

Wont be able to attach the application hence attaching the dump of the report in excel, I am really confused and would really appreciate if you could help me out with this.

Regards,

Saniya.

Anil_Babu_Samineni

Here, It showing 386 only. Might they entered manually i've tested this =SUM(C2:C387)

Check your attachment.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

What is the name of your dimension? I think all you need is to do this

Sum(Aggr(If(Sum(Sales) > 0, Count(DISTINCT Customer)), DimesnionName))

Replace DimensionName with the name of the dimension you have in your table....