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

What would be the simplest way to enable users to pick two nonsequential months and compare various measures (volume, revenue, etc.) in a pivot table?

Hi,

For using comparisons year-on-year, the same month, or quarter or year) I use these expressions:

Previous year: sum({$<Year={$(=Year-1)}>} Qty)

Current year: sum({$<Year={$(=Year)}>} Qty)

What to use if an user selects November vs March?

Any idea?

Thanks a lot

Labels (1)
1 Solution

Accepted Solutions
Or
MVP
MVP

How exactly has the user selected this? That would impact the solution...

You could use alternate states to allow two independent comparison periods to be selected (they don't have to be any specific length, or even the same length). If the period length is always one month, you could use a set to get the max(Month) and Min(Month) for the comparisons, respectively.

View solution in original post

2 Replies
Or
MVP
MVP

How exactly has the user selected this? That would impact the solution...

You could use alternate states to allow two independent comparison periods to be selected (they don't have to be any specific length, or even the same length). If the period length is always one month, you could use a set to get the max(Month) and Min(Month) for the comparisons, respectively.

NenadV
Creator
Creator
Author

Yes, I've been thinking about Alternate states and was not sure if I can use them in a single pivot table. I'll take this route and get back with the outcome.