Forum Discussion
Anonymous
3 years agoNot applicable
How to convert SQL power function case statement to dax
1 - POWER (1-(case
when (COALESCE(sum(ABC),0) - COALESCE(sum(ABCD),0)) < 0 then 0
else (COALESCE(sum(ABC),0) - COALESCE(sum(ABCD),0)) / sum(XYZ) end),12)
Anonymous Please Try below Code
Measure=VAR ABC = (COALESCE(COALESCE(sum(ABC),0)-COALESCE(sum(ABCD),0)VAR XYZ = DIVIDE(ABC , sum(XYZ) )VAR Power = 1-IF(ABC<0,0,XYZ)RETURNPOWER(Power,12)
Anonymous If this post helps, then please consider Accept it as the solution and give Kudo to help the other members find it more quickly.
1 Reply
- Mahesh0016Super User
Anonymous Please Try below Code
Measure=VAR ABC = (COALESCE(COALESCE(sum(ABC),0)-COALESCE(sum(ABCD),0)VAR XYZ = DIVIDE(ABC , sum(XYZ) )VAR Power = 1-IF(ABC<0,0,XYZ)RETURNPOWER(Power,12)
Anonymous If this post helps, then please consider Accept it as the solution and give Kudo to help the other members find it more quickly.