Forum Discussion

LaurenceSD's avatar
LaurenceSD
Icon for Advocate II rankAdvocate II
5 years ago
Solved

Running total - stop at today

Hi,   I've managed to create a running/cumulative total for my bookings, however, I'm trying but failing to find a way of stopping this year's line carrying on past today's date.   My Dax formula...
  • LaurenceSD's avatar
    5 years ago

    a slicer of dumb luck led me to the correct formula, when playing about with some other ideas I accidentally left out the .date from my date table and voila it worked - I'm guessing something to do with the way time intelligence works (i'd not marked my date table as a table, as I wanted to be able to use the predefined heirachy)

     

    So this

    CALCULATE(BOOKINGS[Bookings],DATESYTD('DATESBKGS&ENQS'[Dates-Bkg&Enq].[Date]))

    becomes

    CALCULATE(BOOKINGS[Bookings],DATESYTD('DATESBKGS&ENQS'[Dates-Bkg&Enq])

    & it works strangely (or not so strangely I'm sure to some!)