Forum Discussion

bknecht2's avatar
bknecht2
Frequent Visitor
6 years ago
Solved

Issue with DAX Formula - Can't Figure it Out

Hey Everyone,   I'm having an issue getting the right answer from a DAX formula and hoping someone can help me out - been trying for days now (I have an example data file attached with the answer I...
  • lbendlin's avatar
    lbendlin
    6 years ago

     

     

    TQO's Prior Year = 
    var d=min('Date Table'[Date])
    var e=EDATE(d,-12)
    var c=CALCULATE([TQO's]
    ,SAMEPERIODLASTYEAR('Date Table'[Date])
    ,USERELATIONSHIP(Data[TQO Date],'Date Table'[Date])
    ,Data[AQL Date]>=e)
    return c

     

     

    Note:  This give you the desired result but it ignores the MAX value of the date slider.

    Note 2:  Your 365 made me chuckle. Replaced it with the much safer EDATE(-12)