Forum Discussion
CahabaData
Memorable Member
9 years agoTrailing 12 or Rolling 12 month sum
trying to craft the correct DAX measure; data table/model is transacation per row/record: (snippet of 1 month) Person - ActualDate - Amount Jim 11/22/16 $1000 Jim ...
- 9 years ago
you don't need to use monthname, that is only for average, but this formula you need to translate
Sales12M := CALCULATE ( [Sales], DATESBETWEEN ( Calendar[FullDate], NEXTDAY ( SAMEPERIODLASTYEAR ( LASTDATE ( Calendar[FullDate] ) ) ), LASTDATE ( Calendar[FullDate] ) ) )So sales in this case will be amount and full date will be replaced with date from your calendar table.
You don;t need to worry about person, once you add this on a visual with person, it will automatically group it by person.
CahabaData
Memorable Member
9 years agofirst let me thank you for staying with this....much appreciated...
this file/report has a set of visuals and so far I've had no need for a Calendar Table - - and so being both curious and lazy I instead used the ActualDate field rather than setting up a Calendar Table....and all appears to be working....
must admit the NEXTDAY clause still has my head spinning
jausting
8 years agoFrequent Visitor
So can we please see your code for the resolution ?