Forum Discussion
DAX ??? Help
- 1 year ago
Hello Syndicate_Admin
You can try with below DAX for calculated column
New Val =
VAR CurrentIndex = 'Table'[Index]
VAR CurrentVal = 'Table'[Val]
VAR PrevVal =
CALCULATE(
MAX('Table'[Val]),
FILTER(
'Table',
'Table'[Index] = CurrentIndex - 1
)
)
RETURN
IF(
CurrentVal < 0,
0,
IF(
PrevVal < 0,
CurrentVal + PrevVal, -- because PrevVal is negative
CurrentVal
)
)
Thanks,
Pankaj Namekar | LinkedInIf this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.
Hi Syndicate_Admin
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
Thank you.