Forum Discussion
DAX: Previousmonth / parallelperiod / dateadd doesn't work
- 8 years ago
Hi RemiAnthonise,
It looks like it's the TRansactionDate in your ProjectPostTransViews as it's a datetime field with a time of 12:00:00 midday. So when you link the Calendar table to it it will return no values as these are just the date that will assume midnight.
Create a new column in the ProjectPostTransViews table like;
TransactionDateOnly = date(year(ProjectPostTransViews[TransactionDate]),month(ProjectPostTransViews[TransactionDate]),DAY(ProjectPostTransViews[TransactionDate]))
then join on that.
- 8 years ago
And you will need to change what you grouping by in your matrix. So either create a new column on Calendar that is "maand nummer" or group by Jaar and Maand from Calendar.
Can you try replacing semicolons with comma in your formula.
- RemiAnthonise8 years ago
Helper V
abhi9255 Unfortunately, that doesn't work.
- abhi92558 years ago
Advocate II
Can you try this
Total Sales vorige maand3 = CALCULATE(ProjectPostTransViews[Total Sales],DATEADD('Calendar'[Date], -1, MONTH))
- RemiAnthonise8 years ago
Helper V
abhi9255 That's what I did, see the yellow bar with the corresponding error.
Currently, I'm checking my relationships between the tabels but I can't find something.