Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Recently I attended an interview. Below is one of the questions asked. Could any one please help me with the answer.
Suppose we have sales data for years from 2001 to 2015. If I select year 2015, the chart should display sales data for years 2010 to 2015. Similarly, If I select year 2010, the chart should display sales data for years 2005 to 2010.
How can you do that using set analysis ?
you ca use a chart with year as dimension and this expression
sum({$ <year={">=$(=max(year)-5)<=$(=max(year))"}> } sales)
Thanks Maxgro.
I believe max(year) is identical to year. Please correct me if I am wrong.
Do you think the above expression gives correct results if I select year as 2010 ?
Thanks,
Chowdary
small example in the attachment
Thanks maxgro.
It works
please close the thread