Forum Discussion
Dax IF/AND Statement with Null condition
- 4 years ago
Hi, Anonymous
You can try the following methods.
Quality = IF([Version]=BLANK()&&[Date]<>BLANK(), "Yes", "No")Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Do you have any examples of input and output data?
Remark from https://docs.microsoft.com/en-us/dax/blank-function-dax
Some DAX functions treat blank cells somewhat differently from Microsoft Excel. Blanks and empty strings ("") are not always equivalent, but some operations may treat them as such.
- Anonymous4 years agoNot applicable
Input
Version Date A 9.12 A 9.10 B 9.12 Output
Version Date Quality A 9.12 No A Yes 9.10 No B 9.12 No No They are blank and not empty strings.
Please let me know if you need anymore clarity
- erothen4 years agoFrequent Visitor
When recreating in my own PBI, I noticed your provided DAX statement has an extra parenthesis after ISBLANK([Date]), so you could try the fixed version below:
Quality = IF(NOT(ISBLANK([Version])) && ISBLANK([Date]), "Yes", "No")If this doesn't fix things, can you let me know if there is an error (and if so, what does it say), or does the quality column just come up as blank? Also, what data type are you using for date?
- v-zhangti4 years ago
Community Support
Hi, Anonymous
You can try the following methods.
Quality = IF([Version]=BLANK()&&[Date]<>BLANK(), "Yes", "No")Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.