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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
bobbydave
Creator III
Creator III

Partial sum incorrect

As you can see from my attachment, my partial sum total is incorrect by about 200 on a pivot

Anyone any ideas why this happens.

My dimensions are

Country

2 Cyclic groups

Calendar cyclic group consisting of Year, YearMonth, YearWeek

Expression

count (distinct (case_no)

Any help appreciated

1 Solution

Accepted Solutions
sunny_talwar

Use Sum(Aggr())... like this

Sum(Aggr(Count(DISTINCT case_no), Country, [$(=GetCurrentField(Group1)], [$(=GetCurrentField(Group2)], [$(=GetCurrentField(Group3)]))

View solution in original post

2 Replies
sunny_talwar

Use Sum(Aggr())... like this

Sum(Aggr(Count(DISTINCT case_no), Country, [$(=GetCurrentField(Group1)], [$(=GetCurrentField(Group2)], [$(=GetCurrentField(Group3)]))

jmvilaplanap
Specialist
Specialist

Hi

I think is because the "DISTINCT" clause.

Inside any row of your table you are counting this distinct but in the total row there are case_no that are in more than a row and is counted only once.

Regards