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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
vpanchuda
Contributor III
Contributor III

Adding data from previous column in pivot table

 

HI Experts

The Category and month are my dimension and Count of Category is the measure below is the table i got after calculation and Pivoting.

 MonthYear     
CategoryTotalsMay-19Jun-19Jul-19Aug-19Jun-20
B14-31--
B241-3--
B31----1
C11-----
D12-----

 

I need the below calculation as in the table 

CategoryTotalsMay-19Jun-19Jul-19Aug-19Jun-20
B14(Show the Pevious column if Null in this case 4)31--
B241 (Subtract with previous column if there is a value in this case 4-1=3)-3--
B31----1
C11-----
D12-----

 

 

and the result table i intend to get should be like below.

 MonthYear     
CategoryTotalsMay-19Jun-19Jul-19Aug-19Jun-20
B1441000
B2433000
B3111110
C1111111
D1222222

 

Can someone help me, please.

Labels (1)
0 Replies