Forum Discussion
mpmsltd
Helper I
6 years agoLook back 365 days calculation
Hi everybody, I have a table with dates, dollar value and category of each transaction. I want to see my margin for the past 12 months - but each data point on my chart (example below) should calc...
- 6 years ago
Add a calendar table and build relationship, then add measure below.
Measure = CALCULATE ( SUM ( 'Table'[total] ), DATESINPERIOD ( 'Calendar'[date], MAX ( 'Calendar'[Date] ), -12, MONTH ), 'Table'[category] = "sale" )
amitchandak
Super User
6 years agotry
Rolling 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date Filer],ENDOFMONTH(Sales[Sales Date]),-12,MONTH))
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p/881739
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601