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

How to make a gauge chart show data from a year before the selected date?

Hi!

I have a master calendar. I need a gauge chart to display the data from a year prior to what the user selects. Here is my expression:

=money(sum({<Year ={'$(=Max(Year)-1)'}>}([Total Revenue])))

What am I doing wrong? Thanks for your help, Qlik Community!

1 Solution

Accepted Solutions
Not applicable
Author

Hey guys,

It is:

=sum({<FiscalYear ={"$(=max(FiscalYear)-1)"}>}NameOfField)

Master calendar has FiscalYear, not just year. That's where is was getting confused. Thanks so much for your help!!!

View solution in original post

6 Replies
sunny_talwar

Try it with double qoutes

=Money(Sum({<Year ={"$(=Max(Year)-1)"}>}([Total Revenue])))

Not applicable
Author

It shows the same thing. Any other ideas? I really appreciate your help!

sunny_talwar

So if your user select 03/24/2015 you want to see a gauge chart for 2014, right?

satishkurra
Specialist II
Specialist II

Hi

I tried with sun india expression, it is working fine.

Also try the below by selecting data Year

Sum({$<Year={$(=Only(Year)-1)}>}[Total Revenue])

Thanks

Satish

awhitfield
Partner - Champion
Partner - Champion

Hi Elizabeth,

if this is not sorted, can you upload an example qvw that shows the issue please?

Andy

Not applicable
Author

Hey guys,

It is:

=sum({<FiscalYear ={"$(=max(FiscalYear)-1)"}>}NameOfField)

Master calendar has FiscalYear, not just year. That's where is was getting confused. Thanks so much for your help!!!