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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pivot Grid - Total Value is wrong

Hi! Look at the Expression "Conten." in the attached image. The "Total" value is wrong.

Expression "Conten." = count({<BGLOGContenedorOBodega={'CONT'}>}DISTINCT BGLOGContenedorNro)

Thanks

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

The total value is correct, but you want a sum of counts instead of a count at the total level. So, sum the counts:

sum(aggr(count( ...stuff...) , Dim1, Dim2, ... etc)). Replace Dim1, Dim2, ... etc with the dimensions of your pivot table.


talk is cheap, supply exceeds demand

View solution in original post

10 Replies
vishsaggi
Champion III
Champion III

IS it possible to share a sample app to look into please ?

richard_chilvers
Specialist
Specialist

Have you checked the Total Mode on the Expressions tab of the chart ?

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

The total value is correct, but you want a sum of counts instead of a count at the total level. So, sum the counts:

sum(aggr(count( ...stuff...) , Dim1, Dim2, ... etc)). Replace Dim1, Dim2, ... etc with the dimensions of your pivot table.


talk is cheap, supply exceeds demand
Not applicable
Author

Hi! Yes! In the second attachment you can see that is disabled (i don't know why)

Thanks

Not applicable
Author

Ok! The problem is that Dimensions are dynamics. The end user can select/unselect the dimension dynamically.

Thkanks

Anil_Babu_Samineni

Perhaps This?

Capture.PNG

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

How are they selecting it? Can you share a screenshot of the dimension tab?

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Then use a straight table instead of a pivot table and set the Total Mode of the expression to Sum of rows.


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks but i need to use a pivot table.

Now is working. I did it using variables to get the selected dimensions and adding it to the expression that you shared me.

Thanks