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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Rsaiq
Creator
Creator

Calculate Growth for using in qlikview pivot table by using Year and Month dimensions.

Hi All,

I am calculating Grouth on Year and month wise in qlikview.

Dataset.

Year Month Amount

2021 Jan 100

2021 Feb 200

2022 Jan 300

2022 Feb 400

2023 Jan 500

2023 Feb 600

2023 Mar 700

For Current Year, I am picking current Year value as sum({<Year= {$(=max (Year))}>) Amount)

For Previous Year, I am picking Previous Year value as sum({<Year= {$(=max (Year)-1)}>) Amount)

For Growth ,

sum({<Year= {$(=max (Year))}>) Amount)

/

sum({<Year= {$(=max (Year)-1)}>) Amount)

used 3 list boxes 1 for Current Year, 2 for Previous Year and 3rd one for Growth and added their expressions.

Everything is working fine,I am getting the expected growth if i am selecting any year or month on list boxes

Scenario 1:

When selecting a Year as 2021 it is fetching current year amount, Previous year amount and growth to their reapective list objects.(see image below)

20230204_130615.jpg

Scenario 2:

When selecting a month from filter lets say Feb then it should compare amount between current month of current year I.e 2023 Feb with last year I.e 2022 feb,it's also giving me correct outputs on lists.(see image below)

20230204_131222.jpg

But when i am adding Year, Month as a dimension and Growth formula as a expression in pivot table.I am not getting anything.(see image below)

20230204_133024.jpg

 

Can we just show this perfectly in pivot table and that should work same as list objects when select any year or month from filter.

 

Could anyone please help me to get this done.Thank you 

Labels (6)
2 Replies
ogster1974
Partner - Master II
Partner - Master II

This is a Qlik Sense forum rather than QlikView hence probably your lack of response.

I cant see anything fundamentally wrong with what you are trying to do.  Perhaps if you shared the properties tabs to show how you've setup your Dimensions and Measures in the pivot table we can see the problem.  For example Month isn't showing but year is. Perhaps you've disabled the display of these items without realising.

 

Aditya_Chitale
Specialist
Specialist

can you share sample qvf ? Before that try converting your pivot into straight table  and check if you have suppressed zero values.

Below screenshot shows growth getting calculated on total level rather than on each line item.

Aditya_Chitale_0-1675677456872.png

 

Regards,

Aditya