Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Help with challenging SUMX calculated columns problem

Hello,

 

I am trying to do this: for every row in Table1, filter Table1 between the rows StartDate column and StartDate plus 90 days and then within that filtered date range for Table1, sum up all the values in the Revenue column. I was thinking of doing this using a calculated column and using the function SUMX but I am struggling so I was wondering if anyone has any ideas for this problem.

 

Thanks

  • Anonymous 

     

    You may refer to the DAX below.

    Column =
    VAR d = Table1[StartDate]
    RETURN
        SUMX (
            FILTER ( Table1, Table1[StartDate] >= d && Table1[StartDate] <= d + 90 ),
            Table1[Revenue]
        )