Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pivot table: how to force Sum in totals

Hi guys, one question.

I experienced the following issue.

I have a source Excel file like that (I copied just the first rows; attached the file).

     

StoreHourReceiptPOSDayProductValue
STORE A08:0000700000001201401310999103278,00
STORE A08:0000700000001201401310999300-278,00
STORE A08:0000700000002201401310999103255,00

I created a simple Pivot Table with Hour and Store as dimensions and "Count (DISTINCT ReceiptPOSDay)" as Expression.

Below the Pivot table :

 

HourStoreCount (DISTINCT ReceiptPOSDay)
08:00STORE A435
08:00STORE B4
08:00STORE C24
08:00STORE D31
08:00STORE E26
08:00Total519
Total

519

The problem I'm facing is that I'd like to have the "Total" as sum of the figures of the last column. To be more precise I'd like to see 520 (435+4+24+31+26=520) as Total. Do you know if there is a way to have this result as Total?

One more question: do you know how Qlikview calculate 519??

Thanks a lot

Gncwal

1 Solution

Accepted Solutions
sunny_talwar

Try this:

Sum(Aggr(Count (DISTINCT ReceiptPOSDay), Hour, Store))

Output:

Capture.PNG

And to answer your other question why the sum is coming as 519. One of the ReceiptPOSDay might be getting repeated in two stores making it distinct for that store but not distinct overall.

View solution in original post

4 Replies
sunny_talwar

Try this:

Sum(Aggr(Count (DISTINCT ReceiptPOSDay), Hour, Store))

Output:

Capture.PNG

And to answer your other question why the sum is coming as 519. One of the ReceiptPOSDay might be getting repeated in two stores making it distinct for that store but not distinct overall.

Not applicable
Author

Hi

   See the attached qvw

Not applicable
Author

It works!

Thanks everybody for your reply!!

sunny_talwar

No problem

I am glad I was able to help.

Best,

Sunny