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

Creating a Pivot table

Dear Qlik Community,

I have to create a Pivot table like the one below:

Column: Calendar Year/Month

Values: Net VAVE forcast

Rows: I want to create a dimension with 3 fields: (New),(Carryover),(YTD)

(New): Should display the values of the month of the current year

(Carryover): Should display the values of the same month of previous year

(YTD): Should display the cumulative sum of :(NEW of the said month)+(Carryover of the said month) + (YTD of the previous month)

My code in the set analysis is : =if([Implementation Date (Year)]=([Calendar Year]-1),'Carry over', 'NEW') 

Can someone help how to implement the YTD in the above code? 

An example of the expected result is below:

Best,

AS

  1st  2nd  3rd 4th5th6th7th8th9th10th11th12th
 Actual  Actual  Actual  Forecast  Forecast  Forecast  Forecast  Forecast  Forecast  Forecast  Forecast Forecast
(single: New)53.11358.48169.42069.42069.42069.42069.42069.42069.42069.42069.42069.420
(single: Carryover)154.621144.970169.503105.24289.68079.50552.01653.89737.05130.48812.7650.000
(YTD)207.733411.185650.108824.770983.870#################################################
Labels (4)
1 Reply
MayilVahanan

HI @asinghal0412 

Try like below

Hope (single: New), (single: Carryover), (YTD) are Measures.. 

In that case, For (YTD), try with column names of remaining 2 measures like 

[(single: New)]+[(single: Carryover)]+ alt(Before(YTD),0)

o.p:

MayilVahanan_0-1620815485772.png

 

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.