4 Replies Latest reply: May 18, 2011 5:10 PM by Thiago Ribeiro

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.
• Help in expression in gauge char.

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

• Help in expression in gauge char.

Thanks for you Answer

• Help in expression in gauge char.

((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

• Help in expression in gauge char.

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