Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
In my recent quest to create or catalog as many DAX equivalents for Excel functions, here's an obvious one missing from DAX's logical functions library, the ever popular XOR.
XOR =
VAR __Logical1 = MAXA([Logical1])
VAR __Logical2 = MAXA([Logical2])
VAR __Table = { CONVERT(__Logical1, BOOLEAN), CONVERT(__Logical2, BOOLEAN) }
VAR __TrueRows = COUNTROWS(FILTER(__Table,[Value] = TRUE()))
RETURN
IF(ISEVEN(__TrueRows),FALSE,TRUE)
I have structued this so that it can be easily extended to support any number of logical "input" arguments. Essentially, just add as many items to __Table as desired.
eyJrIjoiZjhhYzFkOTctYTNjOC00OGViLWI1MTItZjI1MWFkN2Y4MDA1IiwidCI6IjRhMDQyNzQzLTM3M2EtNDNkMi04MjdiLTAwM2Y0YzdiYTFlNSIsImMiOjN9