Forum Discussion
Last Month Data
Thanks yes, I have a date table which connects with other data table
Here is my measure = TOTAL_SALES = SUMX(Filter('SALES_TABLE','SALES_TABLE'[COLOR]="Blue"),'SALES_TABLE'([Amt])
Measure 2 = CALCULATE ([TOTAL_SALES], PREVIOUSMONTH('DATE_Table'[Date_Key]))
But as you can see, it returens all the previous months, if I remove Year_Month column, it dows not show any data
I don't understand what you mean by "it returns all of the previous months." It should. It isn't cumulative. March will show Feb, Feb will show Jan, Jan will show Dec of previous year.
Show me exactly what the issue is, as you only showed "Measure 2" and not "Total Sales"
The first thing to check though is make sure any date data in your table is coming from the Date table, not the date field in your sales table. The date intelligence functions require the Calendar/Date table to be used in the visuals to work right.
- Anonymous7 years agoNot applicable
So here is my fact table and date table, date keys in fact are coming from Date table.
- Anonymous7 years agoNot applicable
Here is Total Sales
TOTAL_SALES = SUMX(Filter('SALES_TABLE','SALES_TABLE'[COLOR]="Blue"),'SALES_TABLE'([Amt])