Forum Discussion
Anonymous
2 years agoNot applicable
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...
- Anonymous2 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] ))RETURNMINX ( SummaryTable, [Min_Rolling] )Nevertheless, thank you very much for your help!BR,Daniel
SamInogic
Super User
2 years agoHi Anonymous ,
Try below DAX for new Measure :
New_measure =
VAR MinRolling = CALCULATE(MIN('Table'[Rolling]), ALLEXCEPT('Table', 'Table'[ARTICLE_NUMBER]))
RETURN
IF(ISBLANK(MinRolling), BLANK(), MinRolling)
This will give you result as :
This will give you result as :
Thanks!
Inogic Professional Service Division
An expert technical extension for your techno-functional business needs
Power Platform/Dynamics 365 CRM
Drop an email at [email protected]
Service: http://www.inogic.com/services/
Power Platform/Dynamics 365 CRM Tips and Tricks: http://www.inogic.com/blog/
Anonymous
2 years agoNot applicable
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