Forum Discussion
DAX help
- 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!!
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!!
- Anonymous1 year agoNot applicable
Unfortunately I can't create Index, wanted to check using calculated column only.
- Kishore_KVN1 year agoSolution Sage
No, that not right. You can create index without which how you know the order of the value column?
So, you have to figure out a way of creating index for your data. Atleast ROW NUMBER should be created.