Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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 (2)
2 Replies
Highlighted
Creator
Creator

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
Highlighted
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))?