15
Shannon Lindsay on Twitter: "#DAX 'did ya know' of the day - using if with...
source link: https://twitter.com/shan_gsd/status/1301576373220323329
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Don’t miss what’s happening
People on Twitter are the first to know.
Tweet
See new Tweets
Conversation
#DAX 'did ya know' of the day - using if with and in a measure: if you use && you get back a TRUE/FALSE value, if you use & you get back a text value, and if you wrap the whole thing in a VALUE you get back a number! #slowlylearning #trialbyfire #powerbi
Replying to
&& is better and a replacement for AND(condition1,condition2) as you can do many &&.
IF(A && B && C && D && E, this, that)
AND() can only handle 2 things.
Use || instead of OR() for the same reason. Plus, with paren, you can mix and match && and ||.
And you can also have fun with blanks in DAX:
Blank + 5 = 5
Blank * 5 = Blank
5/Blank = ∞
Blank/Blank = Blank
0/Blank = NaN
Show replies
Replying to
I’m going to try this. I’ve just started learning DAX so I’m not even at this level yet.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK