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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
DMB90
Helper I
Helper I

IF, BLANK, & AND statements combined

I am trying to create the following DAX in a column and it's not working properly for me. I would appreciate some assistance.

 

If "Process Column" is BLANK and "Control Type Column" is "Control", then "1", if not, then "0"

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

@DMB90 

 

Two options:

 

= IF( AND( ISBLANK([Process Column]), [Control Type Column] = "Control"), 1, 0 )

 

= IF( ISBLANK([Process Column]) && [Control Type Column] = "Control", 1, 0 )

 

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

5 REPLIES 5
Kedar_Pande
Super User
Super User

@DMB90 

NewColumn = 
IF(
ISBLANK('YourTable'[Process Column]) && 'YourTable'[Control Type Column] = "Control",
1,
0
)
mariussve1
Super User
Super User

Hi,

Why did you accept solution on the latest post and not my first post when I wrote exactly the same?


Br
Marius
BI Fabrikken
www.bifabrikken.no

Hi @mariussve1 

 

Your code had errors.  It didn't have [ ] around the column names and it was missing the closing " around the text string.  If the OP tried that code it would have generated errors.

 

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!


PhilipTreacy
Super User
Super User

@DMB90 

 

Two options:

 

= IF( AND( ISBLANK([Process Column]), [Control Type Column] = "Control"), 1, 0 )

 

= IF( ISBLANK([Process Column]) && [Control Type Column] = "Control", 1, 0 )

 

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!


mariussve1
Super User
Super User

Hi,

 

Could you try:

 

If ( and ( isblank ( Process Column ), Control Type Column = "Control ), 1, 0 )

 


Br
Marius
BI Fabrikken
www.bifabrikken.no

Helpful resources

Announcements