Forum Discussion
If blank dax statement
- 6 years ago
Hi Anonymous ,
We can use the following formula to meet your requirement:
zzProjectDetailsHTMLConcatenate-KH-NextSteps- = VAR XXX = IF ( ISBLANK ( 'Projects (2)'[XXX] ) || 'Projects (2)'[XXX] = "", "no update received", 'Projects (2)'[XXX] ) VAR ZZZ = IF ( ISBLANK ( 'Projects (2)'[ZZZ] ) || 'Projects (2)'[ZZZ] = "", "no update received", 'Projects (2)'[ZZZ] ) RETURN "<h1>" & "TEXT FIELD 1" & "</h1>" & "<p>" & XXX & "</p>" & "<h1>" & "<hr>" & "TEXT FIELD 2" & "</h1>" & "<p>" & ZZZ & "<hr>"If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
BTW, pbix as attached.Best regards,
Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Many thanks, this works as expected. COuld you explain the following part of the code, i am unsure why there is both the ISBLANK and the =""
ISBLANK ( 'Projects (2)'[ZZZ] )
|| 'Projects (2)'[ZZZ] = "",
Hi Anonymous ,
Because in some text column, the value could be empty string or blank value, we use both to ensure that we can get all the blank value, it should be the same result if just use ="":
Best regards,