0

I have a line chart which has two dimensions:

Yearperiod = 201601, 201602, 201603 etc

Acgroup = FAB, BOB, TOE, QUE etc

And one expression:

SUM(Quantity)

This also has Accumulate 12 steps back ticked.

Now the data i get in the chart is correct and is what i want my MAT to be.

However the line chart is showing all dates and i just want to limit it to the last 12.

I have tried doing this with a calculated dimension for Yearperiod like so:

=if(Yearperiod >= addmonths(today(),-6), Yearperiod )

But this didn't do anything.

Matt
  • 14,906
  • 27
  • 99
  • 149

1 Answers1

0

This needs to be done with set analysis using the aggregation and above functions.

sum({<YearPeriod={'>=$(=AddMonths(max(YearPeriod),-11))'}>}aggr(rangesum(above(sum({<YearPeriod=>}Quantity),0,11)),YearPeriod))
Matt
  • 14,906
  • 27
  • 99
  • 149