Forum Discussion
PREVIOUSMONTH
- 10 years ago
Finally you can use your measure:
SP= CALCULATE ( SUM ( Table1 [number ] ) ; previousMonth (CalendarTable [DATE ] ) )
Hi Estefania89 you need a date Table with each day like a calendar.
To create a calendar table you can use:
Create a new Table (From Modeling)
CalendarTable=Calendar("01/01/2015";31/12/2016") you can change the dates according to your tables.
Next, create a relationship between date columns on your tables and Calendar Table.
Finally you can use your measure:
SP= CALCULATE ( SUM ( Table1 [number ] ) ; previousMonth (CalendarTable [DATE ] ) )
- Estefania8910 years agoNew Member
Perfect!
It works now. Thanks so much for all your help!
- Anonymous7 years agoNot applicable
Hi,
I have the same problem but I already have a date table.
I linked it to my sales table. The SAMEPERIODLASTYEAR function works properly but the PREVIOUSMONTH function is not working. It's giving me a blank column. Please help !
Thank you !