Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
01-29-2018 16:00 PM - last edited 06-27-2018 13:25 PM
These two measures convert Cartesian coordinates to polar coordinates. Both take two parameters, x and y, which are Cartesian coordinates.
r = SQRT(POWER(MAX([x]),2)+POWER(MAX([y]),2))
theta =
SWITCH(TRUE(),
MAX([x])>0, ATAN(MAX([y])/MAX([x])),
MAX([x])<0 && MAX([y])>=0, ATAN(MAX([y])/MAX([x]))+PI(),
MAX([x])<0 && MAX([y])<0, ATAN(MAX([y])/MAX([x]))-PI(),
MAX([x])=0 && MAX([y])>0,PI()/2,
MAX([x])=0 && MAX([y])<0,-1*PI()/2,
BLANK()
)
eyJrIjoiYjY5OTIxMzEtMWRiNy00ZmQ0LTk5ZjMtMTMxN2M4OTdiNTMwIiwidCI6IjRhMDQyNzQzLTM3M2EtNDNkMi04MjdiLTAwM2Y0YzdiYTFlNSIsImMiOjN9