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

How to get sum of total rows in pivot table

Hi Team,

     I have tried and gone through many threads for this issue.Although am able to get the sum through staright table but unable to achiev the same through Pivot table for expression.

I have 3 dimension FIN_MONTH,YEAR,QUARTER i got some values after doing the expression level calculation.Now i want total of rows of that expression value.I tried to do the same through dimensionality part but no use.

EXPRESSION1:

    COUNT(DISTINCT BOOKINGS)

EXPRESSION2:

COUNT(DISTINCT{<MODE={'YES'}>} BOOKINGS)


     now if i will try to show the total through partial sum and sub total it is giving me the wrong value.


PFA


Regards,

KK

KK
1 Solution

Accepted Solutions
sunny_talwar

Try this

Sum(Aggr(Count(DISTINCT BOOKINGS), FIN_MONTH,YEAR,QUARTER))

View solution in original post

7 Replies
sunny_talwar

Try this

Sum(Aggr(Count(DISTINCT BOOKINGS), FIN_MONTH,YEAR,QUARTER))

vishsaggi
Champion III
Champion III

You can use sunny's expression to get your totals.

OR another way is like Expression Tab Total Mode check sum of rows. If it is just a count then this should also help.

Capture.PNG

Karim_Khan
Creator III
Creator III
Author

I want to implement that logic in pivot table not straight table

KK
Karim_Khan
Creator III
Creator III
Author

If I will go with below logic my values are getting changed but your idea is right I think my data itself is wrong

KK
sunny_talwar

Below logic?

vishsaggi
Champion III
Champion III

OOps sorry, have i been a selected viewer. My bad. Ignore.

Karim_Khan
Creator III
Creator III
Author

Sum(Aggr(Count(DISTINCT BOOKINGS), FIN_MONTH,YEAR,QUARTER))

KK