Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
In my recent quest to create or catalog as many DAX equivalents for Excel functions, was able to use the magical power of beans to create IMSQRT.
IMSQRT =
VAR __Real1 = [IMREAL]
VAR __i1 = [IMAGINARY]
VAR __r = SQRT(POWER(__Real1,2) + POWER(__i1,2))
VAR __theta = ATAN(__i1/__Real1)
VAR __Real = SQRT(__r) * COS(__theta/2)
VAR __i = SQRT(__r) * SIN(__theta/2)
VAR __suffix = IF(MAX([suffix])="","i",MAX([suffix]))
RETURN
SWITCH(TRUE(),
__Real = 0 && __i = 1, __suffix,
__Real = 0 && __i = -1, "-" & __suffix,
__Real = 0, __i & __suffix,
__i = 0, __Real & "",
__i < 0 && __i = -1, __Real & "-" & __suffix,
__i < 0, __Real & "-" & ABS(__i) & __suffix,
__i = 1, __Real & "+" & __suffix,
__Real & "+" & __i & __suffix
)
eyJrIjoiMTZlNWQ0NzEtYjljNS00ZTUzLWE1MjAtY2IwMTRkOGQ4OGNiIiwidCI6IjRhMDQyNzQzLTM3M2EtNDNkMi04MjdiLTAwM2Y0YzdiYTFlNSIsImMiOjN9