Forum Discussion
Simple aggregation
- 8 years ago
I'd stil add the date table. Opens up all kinds of options. you can do this dynamically
Using Create Table form the modeling window
DateDim = CALENDAR(MIN(table[date]),MAX(table(date))
Link to your date column and Voila!
Assuming you have the date table in your model:
CALCULATE(COUNT(Table1.Category),DATEADD(Dates[Date],-1,MONTH)
This will alwasy give you the last month count.
Thanks
Raj
No there is no data tbale in teh model, it is very flat csv file, all the data in a singel sheet.
- Anonymous8 years agoNot applicable
Can you try this?
CALCULATE(COUNT(Table1.Category), YEAR( Table1[Date]) = YEAR(EOMONTH(TODAY(),-1)) && MONTH( Table1[Date]) = MONTH(EOMONTH(TODAY(),-1))
)- Anonymous8 years agoNot applicable
Wouldn't
YEAR( Table1[Date]) = YEAR(EOMONTH(TODAY(),-1))
this give me previous year? I'm looking for current year but previous month.
- Anonymous8 years agoNot applicable
No, This gives the Year of previous month.
- Seward125338 years ago
Solution Sage
I'd stil add the date table. Opens up all kinds of options. you can do this dynamically
Using Create Table form the modeling window
DateDim = CALENDAR(MIN(table[date]),MAX(table(date))
Link to your date column and Voila!