5 Replies Latest reply: Oct 12, 2015 1:32 PM by Massimo Grossi

# Scenario to display sales data in between years using set analysis.

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 ?

• ###### Re: Scenario to display sales data in between years using set analysis.

you ca use a chart with year as dimension and this expression

sum({\$ <year={">=\$(=max(year)-5)<=\$(=max(year))"}> } sales)

• ###### Re: Scenario to display sales data in between years using set analysis.

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

• ###### Re: Scenario to display sales data in between years using set analysis.

small example in the attachment

• ###### Re: Scenario to display sales data in between years using set analysis.

Thanks maxgro.

It works