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

Pivot table column wise comparison

Hello,

 I have a data set like below

Karthick30_0-1683657873298.png

Logic I need help is ... For each month , we have to compare with previous months.. if current month value is greater than previous month value means, subtract them and return the subtracted value.

If current month value is lesser than previous month means, it should be 0.. Next month comparison should be compared with the previous to Previous month ( which ever month has higher value )

For my above dataset, I need the output like below

Karthick30_1-1683658090468.png

Here if you see for Spain.. Feb 23 is ( 55-50 = 5 )

but for India , feb value is lesser than Jan. so its 0. again March value is lesser than Jan.. its should be 0 again. April value is higher than Jan. so ( 90 - 85 = 5 ) for Apr -23 ( India )

Any help on this..

 

 

 

Labels (2)
0 Replies