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

Wrong total count in qlik sense pivot table

Hi

I've been bashing my head against a wall on this one and I'm sure the solution will be a simple one.

I have data where there are unique caller ID. A caller may call with multiple issues which may fall into specific categories. A category may have two issues that the  caller has called about so logically that is 2 row numbers but one caller ID. The total count in that case should be 2 not 1 (which is the distinct count of the ID).

My problem is I am getting the wrong total count in the pivot table. If I use row numbers the count on the issues is correct but the count total of the category is wrong. Could someone tell me where I'm going wrong? I've attached a sample

Labels (1)
2 Solutions

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi, It is because the total is evaluation of the expression at the overall level and it is not the sum of the values.

If you need a sum of values then you can do using aggregation.

Your expression will become

Sum(Aggr(SubStringCount(Concat(DISTINCT QPIC_Caller_ID, ', '), ', ') + 1,Category, Group, Name))

 

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

nyakeyac
Contributor II
Contributor II
Author

Thank you so much, that worked. I'll now validate the data to make sure before I send it off.

I really appreciate you taking time to help.

Thank you.

Cynthia

View solution in original post

2 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi, It is because the total is evaluation of the expression at the overall level and it is not the sum of the values.

If you need a sum of values then you can do using aggregation.

Your expression will become

Sum(Aggr(SubStringCount(Concat(DISTINCT QPIC_Caller_ID, ', '), ', ') + 1,Category, Group, Name))

 

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
nyakeyac
Contributor II
Contributor II
Author

Thank you so much, that worked. I'll now validate the data to make sure before I send it off.

I really appreciate you taking time to help.

Thank you.

Cynthia