Forum Discussion

RSebastiani74's avatar
RSebastiani74
Frequent Visitor
2 years ago
Solved

Cumulative Total Measure - Going over current date

Hello,    I am having a little issue with my Cumulative Total I created based on Weekending Date.  I currently have a dataset that returns past totals based on weekending and also has future foreca...
  • CoreyP's avatar
    CoreyP
    2 years ago

    Oh, sorry. You need to add a MAX:

    Cumulative Total =
    IF( DATEDIFF( MAX( WE[Week Ending] ) , TODAY() , DAY ) >= -6 ,
    CALCULATE (
    SUM(WE[Val]),
    FILTER (
    ALL( WE[Week Ending]),
    WE[Week Ending] <= MAX ( WE[Week Ending])
    )
    ) , BLANK() )