Forum Discussion

PeteSil's avatar
PeteSil
Frequent Visitor
3 years ago
Solved

Summing Data Until Date Selected

Hello,   I am trying to sum up an amount until the date chosen in the slicer. So for example I have the below data:   Date               Batch            Hours 1/1/2023         BZ89             ...
  • PeteSil's avatar
    3 years ago

    I was actually able to solve it myself. Was overthinking the DAX formula. Maybe it will help someone else, so I posted it below.

     

    BATCH Hours to Date =
    VAR SelDate = SELECTEDVALUE('Ultimate Calendar'[WeekDay])
    RETURN
    CALCULATE(sum('ADP Batch Hours'[Hours]), 'Ultimate Calendar'[WeekDayCorrect] <= SelDate)