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: 
Not applicable

Help in expression in gauge char.

I need help to create an expression for the gauge chart that calculates the percentage of comparing the values ​​of the selected years.
imagem.JPG
1 Solution

Accepted Solutions
perumal_41
Partner - Specialist II
Partner - Specialist II

((sum({$<Year={"$(=MAX(Year))"}>} field)-(sum({$<Year={"$(=min(Year))"}>} field)))/(sum({$<Year={"$(=MAX(Year))"}>} field)))*100

View solution in original post

4 Replies
perumal_41
Partner - Specialist II
Partner - Specialist II

((sum({$<Year={"$(=MAX(Year))"}>} field)-(sum({$<Year={"$(=min(Year))"}>} field)))/(sum({$<Year={"$(=MAX(Year))"}>} field)))*100

Not applicable
Author

Thanks for you Answer

Not applicable
Author

((sum({$<Year={"$(=MAX(Year))"}>} field)-(sum({$<Year={"$(=min(Year,2))"}>} field)))/(sum({$<Year={"$(=MAX(Year))"}>} field)))*100

Solution suggested by permula also would work, if user selects only two years from list box. for eaxmple user selects 2009 and 2011. it`ll give the comparison between 2009 and 2011. but incase user select 3 yrs like 2007,2009,2011 then perumal solution would give you the result for 2007 Vs 2011. but by using Max(Year,2) would return the 2009  second max value so as you required the you could compare 2009 Vs 2011.

hope this help you.

- Sridhar

Not applicable
Author

Extremely helpful example!!! Thanx and congrats!!!