Forum Discussion
Anonymous
10 years agoNot applicable
How to create last twelve months - calculated column/measure based on selected year and month slicer
I have a report which contains a year slicer and a month slicer so you can select a specific scope for the related charts. Some charts will only look at the selected month in the selected year, but ...
EAfang
10 years agoFrequent Visitor
In your DAX formular, you iterated by MONTH with
DATESBETWEEN (
'Date'[YearMonthnumber];....And then used the NEXTDAY() function which pushes by a day. Try using the DAY iteration like this
Sales12M = CALCULATE (
SUM('data'[Sales]) / 1000;
DATESBETWEEN (
'Date'[Date];
SAMEPERIODLASTYEAR ( NEXTDAY ( LASTDATE ( 'YearMonths'[Date] ) ) );
LASTDATE ( 'YearMonths'[Date] )
)
)- Anonymous9 years agoNot applicable
I was wondering if you got this to work. I am having the same issue. I am about to just give up :(