Forum Discussion
pk1593
3 years agoHelper I
Tableau to DAX code
Can anyone help in converting this code to DAX? S = ABS([x]-LOOKUP([x],-1))/ ( SQRT ( ABS(((([y] + LOOKUP([y],-1))/(SUM([z])+LOOKUP(SUM([z]), - 1)]))) * (1-(([y] + LOOKUP([y],-1))/(SUM([z])...
ValtteriN
3 years agoCommunity Champion
Hi,
For converting Tableau to DAX try utilizing ChatGPT. It works fast and provides answers like this:
S = ABS([x] - LOOKUPVALUE([x], -1)) / (SQRT(ABS( (([y] + LOOKUPVALUE([y], -1)) / (SUM([z]) + LOOKUPVALUE(SUM([z]), -1))) * (1 - (([y] + LOOKUPVALUE([y], -1)) / (SUM([z]) + LOOKUPVALUE(SUM([z]), -1)))) ) / (1 - ((1 / (SUM([z]) + LOOKUPVALUE(SUM([z]), -1)))))) * (1 / SUM([z]) + 1 / LOOKUPVALUE(SUM([z]), -1)))
You can also replace / with DIVIDE to avoid issues with 0. For the [x], [y] and [z] use the corresponding column refrerences.
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/