Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Calculating maximum of rolling sum

Hi,   I have a table with the list of article numbers and movement dates - the table is sorted by article number and then, chronologically, by movement dates. Then, in the third column, I have a qu...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi SamInogic ,

     

    unfortunately, the solution you have suggested doesn't work - I simply get blanks as values in the column. Luckily, with help of ChatGPT, I've managed to create a measure that works:

    New_measure =
    VAR SummaryTable =
        SUMMARIZE (
            'Table',
            'Table'[ARTICLE_NUMBER],
            "Min_Rolling", MINX ( FILTER ( 'Table', 'Table'[ARTICLE_NUMBER] = EARLIER ( 'Table'[ARTICLE_NUMBER] ) ), [Rolling] )
        )
    RETURN
        MINX ( SummaryTable, [Min_Rolling] )
     
    Nevertheless, thank you very much for your help!
     
    BR,
    Daniel