Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Saxon10
Post Prodigy
Post Prodigy

IF ISBLANK Return Blank

 

Hi,

 

I have a one table, that table contain multiple columns and count. I am trying to build final status based on the columns A:G.

 

ITEMABCDEFGREESULT
1232      ONE
12446     MULTIPLE
1251111   MULTIPLE
12611     MULTIPLE
12711     MULTIPLE
1281      ONE
1291      ONE
1301      ONE
1311      ONE
1321      ONE
1331      ONE
1341      ONE
1351      ONE
1361      ONE
13731     MULTIPLE
13831     MULTIPLE
139112    MULTIPLE
1402      ONE
1412      ONE
1421111   MULTIPLE
14331282  MULTIPLE
1442      ONE
14542211  MULTIPLE
146        
147        
148        

 

I am applying below mentioned DAX and it's working well but it will give a wrong result (Multiple) were columns are blanks (A:G) but desired result is blanks. Please refer 146,147 and 148.

 

Desired Result = IF(IF(ISBLANK(Table1[A]),0,1)+IF(ISBLANK(Table1[B]),0,1)+IF(ISBLANK(Table1[C]),0,1)+IF(ISBLANK(Table1[D]),0,1)+IF(ISBLANK(Table1[E]),0,1)+IF(ISBLANK(Table1[F]),0,1)+IF(ISBLANK(Table1[G]),0,1)=1,"One","Multiple")
DAX-BLANKS.PNG
1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @Saxon10 

 

Download sample PBIX file

 

Modify the DAX to this

Result = 

VAR _Count = IF(ISBLANK(Table1[A]),BLANK(),1)+IF(ISBLANK(Table1[B]),BLANK(),1)+IF(ISBLANK(Table1[C]),BLANK(),1)+IF(ISBLANK(Table1[D]),BLANK(),1)+IF(ISBLANK(Table1[E]),BLANK(),1)+IF(ISBLANK(Table1[F]),BLANK(),1)+IF(ISBLANK(Table1[G]),BLANK(),1)

RETURN IF(_Count=1, "One", IF(ISBLANK(_Count), BLANK(), "Multiple"))

blnk12.png

 

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

2 REPLIES 2
PhilipTreacy
Super User
Super User

Hi @Saxon10 

 

Download sample PBIX file

 

Modify the DAX to this

Result = 

VAR _Count = IF(ISBLANK(Table1[A]),BLANK(),1)+IF(ISBLANK(Table1[B]),BLANK(),1)+IF(ISBLANK(Table1[C]),BLANK(),1)+IF(ISBLANK(Table1[D]),BLANK(),1)+IF(ISBLANK(Table1[E]),BLANK(),1)+IF(ISBLANK(Table1[F]),BLANK(),1)+IF(ISBLANK(Table1[G]),BLANK(),1)

RETURN IF(_Count=1, "One", IF(ISBLANK(_Count), BLANK(), "Multiple"))

blnk12.png

 

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Hi, 

 

Thank you so much for your help and sorry for the late reply. Your solution is working very well. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.