Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Getting previous quarter value showing current quarter in dimension

Hi Team,

I have taken sample QVW from one of discussion.

I need selected dimension with previous quarter value in expression. When I use previous quarter in expression dimension is also changing to previous quarter.

So in example I have selected 3 but selected quarter is showing as 2.

I have many dimesions, if I use getselectedvalue function it in dimension not working in some cases.

Regards,

Sai Krishna.

1 Solution

Accepted Solutions
Not applicable
Author

Hi Sunny,

Above function is fetching correct results but in my case it is not working. As the there was blank in first row of my data the entire column is showing blank. I have used below expression and it worked fine. Thanks for your help. 🙂

=Aggr(Max({<Quarter={$(vPreviousQaurter)}>} Amount), RecordKey)

Regards,

Sai Krishna.

View solution in original post

4 Replies
sunny_talwar

This?

Capture.PNG

Expression:

Above(Sum({<Qtr>}Amount)) * Avg(1)

Not applicable
Author

This is not working, I am getting all zeros in real data when I am using the mentioned expression.

max({<QuarterYear={$(vPreviousQaurter)}>}[Cost]), this is showing both quarters Q4 and Q3.

QuarterYear = Q4'16

vPreviousQaurter= Q3'16

sunny_talwar

Have you opened the application I have attached above? I am not sure what 0's you are talking about? Can you elaborate?

Not applicable
Author

Hi Sunny,

Above function is fetching correct results but in my case it is not working. As the there was blank in first row of my data the entire column is showing blank. I have used below expression and it worked fine. Thanks for your help. 🙂

=Aggr(Max({<Quarter={$(vPreviousQaurter)}>} Amount), RecordKey)

Regards,

Sai Krishna.