Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
sunainapawar
Creator
Creator

Comparison of Current Qtr with previous qtr based on selection in pivot table

Hello All,

I have a requirement. I have a pivot table. Dimension is customer. And measures are current and previous qtr. I need to show growth and degrowth based on qtr selection. 

By default ,the growth must be shown as  current qtr-prev qtr but when someone selects a quarter then it must dynamically compare the selected qtr with previous qtr. Or if someone selects a current qtr of current fyear,then it must compare the same quarter of last fyear and show the growth between them. I tried below expression but it is not working.

Current qtr 

If(getselectedcount(qtr)=0,//for default selection

Sum({<quarter='$(vcurrentqtr)',sum(amt),

If(qtr=getfieldselection(qtr),

Sum({<qtr={"=$(getfieldselection (qtr))"}>}amt ))

Here currentqtr is the lastest qtr.

Same expression I have used for previous qtr. But on qtr selection, both previous and current are showing same values 

Kindly help.

 

 

 

1 Solution

Accepted Solutions
sunainapawar
Creator
Creator
Author

Hello All,

I solved this by using Alternate States.

Thank you

View solution in original post

2 Replies
sunainapawar
Creator
Creator
Author

Hello All,

Any idea on this. 

Thanks in advance.

sunainapawar
Creator
Creator
Author

Hello All,

I solved this by using Alternate States.

Thank you