Forum Discussion

alexggrantham's avatar
alexggrantham
Frequent Visitor
1 year ago
Solved

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...
  • Rupak_bi's avatar
    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)