Forum Discussion
Anonymous
1 year agoNot applicable
DAX help
Hi, I have data as mentioned below and wanted to create New Val calculated column, whenever there is negative make it zero and next row record should be substracted negative values. In the below...
- 1 year ago
Hello Anonymous ,
I can suggest quickly with the help of creating INDEX in Power Query.DAX for the new column will be like below:
New Value = VAR PV = LOOKUPVALUE('Table'[Val],'Table'[Index],'Table'[Index]-1) RETURN IF('Table'[Val]<0,0, IF('Table'[Index] =1,'Table'[Val], IF('Table'[Val]>0 && PV < 0, 'Table'[Val] + PV , 'Table'[Val])))Output looks as below:
Attached pbix as well for your refrence.
If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!
v-priyankata
1 year agoCommunity Support
Hi Anonymous
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.