Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
xarapre7
Creator II
Creator II

Always show last 12 months regardless of the YR and Mo selected

=Avg({$<[Group]={'EDC'}>}[Work Days])

=RangeAvg(Above(Avg([WorkDays]),0,12))

I used the expressions above to get the Avg Work Days and its 12-month average.  However, it's showing

all the months for 2016 because Year=2016 is selected.  Is there a way to always show the last 12 months

regardless of the year and month selected? 

Ex: It should show months from September 2015-August 2016 for Avg TAT and 12-month Avg based on current month and year (Sept 2016).

Can you please help me with this?  Thank you!

1 Reply
neelamsaroha157
Specialist II
Specialist II

You can create two variables for the the startdate & rolling 12 months and then disregard the selection of Year & Month in set analysis.

Here is the example

Avg({<[Group]={'EDC'},Date ={">=$(v12rollingMonths)<=$(vAsOfDate)"}, Year = , Month = , Quarter =>}[Work Days])