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: 
Anonymous
Not applicable

Pivot table YoY change / amount

 Hi all, 

I am creating a pivot table to compare YoY for 2017 and 2018. Please refer to 'What i want.PNG' in the attachment.

What i want is how do i generate a pivot table (YoY % change and YoY amount) as shown in the attachment?

 

4 Replies
jyothish8807
Master II
Master II

Hi CHoy,

Below expressions should help you:

Exp1: sum({<Year={'$(=max(Year)-1)'}>}Sales        //2017 Sales

Exp2 :sum({<Year={'$(=max(Year))'}>}Sales        //2018 Sales

Exp 3: (sum({<Year={'$(=max(Year))'}>}Sales  -  sum({<Year={'$(=max(Year)-1)'}>}Sales))   / sum({<Year={'$(=max(Year)-1)'}>}Sales      //YoY % change

Exp4: sum({<Year={'$(=max(Year))'}>}Sales  -  sum({<Year={'$(=max(Year)-1)'}>}Sales  //YoY amount

Best Regards,
KC
Anonymous
Not applicable
Author

Thanks KC! It's working fine now

jyothish8807
Master II
Master II

You are welcome 🙂 Please close the thread by marking the correct answer.

Have a great day.

Best Regards,
KC
Anonymous
Not applicable
Author

Hi KC,

How do close the thread by marking the correct answer? I googled just now but couldn't find the "actions" button as shown below.

https://community.qlik.com/t5/New-to-QlikView/How-to-mark-Helpful-or-correct-reply/m-p/1334212