Forum Discussion
Previous Month Compare
- 8 years ago
Hi Jorgast,
You can try these measures:
_Previous Month = CALCULATE(SUM(Table1[Count of Month]); PREVIOUSMONTH(DIM_DATA[Date]))
_Diff = SUM(Table1[Count of Month]) - [_Previous Month]
_% Change = IF(ISBLANK(DIVIDE(SUM(Table1[Count of Month]); [_Previous Month]; 0)) = TRUE(); BLANK(); DIVIDE(SUM(Table1[Count of Month]); [_Previous Month]; 0) - 1)
Be aware it's important to have a date dimension in order to use time intelligence functions.
Thanks,
Ricardo
- 8 years ago
How would that work if the count of month is measure?
MEASURE: Count of Month = COUNT(Table[Month])
COLUMN: Month = Format(Table[Month], "MMM - YYYY"
Ricardo had the right idea. In your case you just want to show the difference between 2 tables, so you would stop at step #2
_Previous Month = CALCULATE(SUM(Table1[Count of Month]); PREVIOUSMONTH(DIM_DATA[Date]))
_Diff = SUM(Table1[Count of Month]) - [_Previous Month]
_% Change = IF(ISBLANK(DIVIDE(SUM(Table1[Count of Month]); [_Previous Month]; 0)) = TRUE(); BLANK(); DIVIDE(SUM(Table1[Count of Month]); [_Previous Month]; 0) - 1)
Hi Jorgast,
Thank you for your help. I tried this but doesn't work. It shows me that DIM_DATA cannot be found. I will send you some screenshots.