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" )
v-chuncz-msft
Community Support
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"
)