Forum Discussion

cyncyn_98's avatar
cyncyn_98
Frequent Visitor
4 years ago
Solved

Dax Measure : Column Previous Values

Hello everyone,    I'm having a bit of trouble formulating the right dax measure. I have created a matrix table, that will show data based on a week ending date selected. And within the matrix tabl...
  • Fowmy's avatar
    4 years ago

    cyncyn_98 

    Please try it this way:

    Prev Hours =
    VAR __WEEKID =
        MAX ( 'Branch Flash Report'[WeekID] )
    RETURN
        CALCULATE (
            SUM ( 'Branch Flash Report'[TempHrs] ),
            'Branch Flash Report'[WeekID] = __WEEKID - 1,
            REMOVEFILTERS ( 'Branch Flash Report'[WeekID] )
        )