Forum Discussion
DataVitalizer
Super User
7 years agoPreviousMonth returns blank values [DAX]
Hi Community, I have two tables T1 contains values for each store by city and date, and T2 is a date table The problem shows up when trying to return the previous value of the store all returned va...
- 7 years ago
Hi DataVitalizer,
You can create a measure below:
PreviousMonth = CALCULATE(SUM(Table1[MonthlyValue]),PREVIOUSMONTH('Datetable'[Date]),ALLEXCEPT(Table1,'Table1'[City],'Table1'[Store]))Best Regards,
Qiuyun Yu
kcantor
Community Champion
7 years agoI would suggesting visiting the community to post this in the desktop section or the Dax section as this particular site is for reporting issues with the actual product and not with a calculation.
You may want to include a little more info with the post including a snapshot or your model relationships as well in order to diagnose the calculation issue. It seems that the Dax is having an issue defining last month. It may be the relationship or the field you are adding. Your calculation references your column of [Date] but the display shows DateTable. You may want to try droping [Date] on the visual instead of DateTable.