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

Pivot table - Measure calculation based on dimension

Hi Everyone,

I need to create a pivot table which is something like below.

Week

Sum of Balance for the week

Compare: Difference in balance between current week and previous week. 

How can I calculate Compare value?

WeekBalanceCompare?
15/03/2020600210
8/03/2020390180
1/03/202021020
23/02/202019050
16/02/2020140140
Labels (1)
2 Replies
joseph_morales
Creator II
Creator II

Hi @manojkumargowda ,

You can create an expression on the pivot table as follows:

if(
isnull(below(sum(Balance))),
sum(Balance),
rangesum(sum(Balance)-below(sum(Balance)))
)
Best Regards,
Joseph Morales
MichalSa
Contributor II
Contributor II

Thanks! I had the same question and your answer was helpful!

If I also want calculate the difference between the previous 2 weeks from current - how would I do that?

Below ( below ( sum balance))?