Forum Discussion
alexggrantham
1 year agoFrequent Visitor
Help with DATEADD
Hello, I have a date table joined to a fact table and I'm counting rows in the fact table. The ultimate goal is to be able to count the rows in the fact table where the date is before the Max Da...
- 1 year ago
Try This
Max date dateadd = calculate([Max Date],dateadd(date[Max Date],-1,Year))
alternate
Max date dateadd =var _day = day([Max Date])
Var _month = Month([Max Date])
Var _Year_P = Year([Max Date])-1
Return
date(_year_P,_month,_day)
Rupak_bi
Super User
1 year agoTry This
Max date dateadd = calculate([Max Date],dateadd(date[Max Date],-1,Year))
alternate
Max date dateadd =
var _day = day([Max Date])
Var _month = Month([Max Date])
Var _Year_P = Year([Max Date])-1
Return
date(_year_P,_month,_day)