Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

Please help me with ur ideas.......

Regards

Revathy.

4 Replies
Not applicable
Author

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

Not applicable
Author

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)

Not applicable
Author

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.

Not applicable
Author

yes