Forum Discussion

PatrickLamoste's avatar
6 years ago
Solved

Calculate - Sum with Multiple Criteria

Hello,   I am working on a rather tricky SQL table (see below) and now I am in a pickle.   I am trying to get the total hours without adding the values before the latest CARRYFORWARD action (11/2...
  • Greg_Deckler's avatar
    6 years ago

    Perhaps something along the lines of:

     

    Measure = 
      VAR __Max = MAXX(FILTER('Table',[Action] = "CARRYFORWARD"),[Row Number])
    RETURN
      SUMX(FILTER('Table',[Row Number] >= __Max),[Hours])