4 Replies Latest reply: May 2, 2013 12:30 PM by Thomas Jensen

# Line Chart should start from current Month

HI Team

I have a Line chart with MonthYear as the dimension and many expressions. The monthYear dimension has more than 4 years data(both past and future), but my line chart should begin with the current month only..

1.Should i write the conditions in all the expressions or calculated dimension?????

2.If it starts from current month it should show continuously 24 months data ????

Regards

Revathy.

• ###### Re: Line Chart should start from current Month

You could make ur expression so they only sum from current month and forward.

Expression: sum{\$<Year={\$(vThisYear)},Month={\$(vThisMonth)}, Day=}>} sumcolumn)

Day Equals ur date column

Put a 1 infront of year if you dont want any dates to affect your chart.

Variables:

Let vThisYear = num(Year(Today());

Let vThisMonth = num(Month(Today());

• ###### Re: Line Chart should start from current Month

If you want to show 24 months ahead, you need to select a date which is not 2013. and then your month variable should look like this

Let vDateToday = num(Today());

Let vNext24Months = num(AddMonths(vDateToday,24));

Let vRolling24Months = '>=\$(vDateToday) <=\$(vNext24Months)

Expression:

sum{\$<Year={\$(vThisYear)},Month={'\$(vRolling24Months)'}, Day=}>} sumcolumn)

• ###### Re: Line Chart should start from current Month

Yup, that looks about right... Rather than Year = \$(vThisYear) it should  just be Year= , as limiting it to vThisYear will only allow at most 12 months of data.

• ###### Re: Line Chart should start from current Month

yes