Forum Discussion

mady90's avatar
mady90
Frequent Visitor
7 years ago
Solved

Week over Week change

  I have 2 tables, a date table that consists of the following fields:date, year, yearmonth, month, day, WeekNum The second table Consists of the following fields: Name, Cost, Date. The tables...
  • mady90's avatar
    7 years ago

    Just resolved the issue. 

    Showing the dax measure for week over week change(In case it helps someone else):

    Week Over Week = 
    VAR todaycost =CALCULATE(SUM(UsageDetails[Cost]),DATEADD('Date'[Date],0,DAY))
       
    VAR LastWeek =
        CALCULATE (
            SUM ( UsageDetails[Cost] ),
            DATEADD(  'Date'[Date],-7, DAY)
        )
    RETURN
       todaycost-LastWeek