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"
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"
- Jorgast8 years agoResolver II
I was trying to create the formula for _Previousmonth but i am getting hung up on the Calculate(Sum(count of month), Previousmonth(Table[date]). For my report the count of month is a measure. Can that be done using a measure or would the count of month need to be a column?
- ricardocamargos8 years agoContinued Contributor
Calculate(Sum(count of month), -> Should you use COUNT instead of SUM ? You just wanna know the quantity of the values, right ?
If you wanna use PREVIOUSMONTH, you should use date (date dimension).
Answering your question... you do it using measure, just be aware the functions you need.