Forum Discussion

TMO_KY's avatar
TMO_KY
Helper II
3 years ago
Solved

DAX Previous Value with multiple categories

Good afternoon Community,   I know this post will be similar to some others so hopefully it doesn't get overlooked as I can't seem to find the answer and I'm getting stumped.  I have a DAX table th...
  • DataInsights's avatar
    3 years ago

    TMO_KY,

     

    Try this calculated column:

     

    Prev Month Value = 
    VAR vIndex = '24MonthTable'[index]
    VAR vResult =
        CALCULATE (
            MAX ( '24MonthTable'[Failures] ),
            ALLEXCEPT (
                '24MonthTable',
                '24MonthTable'[Product Family],
                '24MonthTable'[Codes]
            ),
            '24MonthTable'[index] = vIndex + 1
        )
    RETURN
        vResult