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

Comparing Selected Quarter vs Prior Quarter ?

I have 3 listboxes year, month and quarter. How can I compare the selected quarter with the prior quarter  when a year and quarter are selected from the listboxes ? Similarly when I select the year and month listboxes, it should compare the months of the selected year vs months of the previous year. Similarly for Year selection.

Here is my measure. Count(distinct id).

The output pivot table should look like this

 

Metric   2019-Q3  2019-Q2

                     3                  4

                     2                   5

Labels (2)
6 Replies
bob654321
Contributor
Contributor
Author

Thanks! I didn't see anything for quarter comparison in the qvw.  I would really appreciate if you can show me how to write one expression to display the quarter comparison.

tresesco
MVP
MVP

The expression would depend on how your data look like. Try to share a sample data set and explain your expected output against that.

qliksus
Specialist II
Specialist II

 

Maybe something like the below 

 

SUM({<Year={$(=if(getselectedcount(Quarter) , only(Year), only(Year)-1 ))},Quarter={$(=if(getselectedcount(Quarter), 'Q'& (right(Quarter,1)-1 ),'*'))} >}amount)

bob654321
Contributor
Contributor
Author

Sorry, your expression did not work.

Brett_Bleess
Former Employee
Former Employee

Bob, have a look over the following Design Blog post, I think it may be helpful:

https://community.qlik.com/t5/Qlik-Design-Blog/Year-over-Year-Comparisons/ba-p/1462927

Here is the base URL in case you want to search further yourself, there are 700+ mostly how-to posts in this area that may prove quite useful.

https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.