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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

IF AND formula for Conditional Column

I am trying to create a column that does something like the following:

 

IF cell in [TextColumn] = "value" AND cell in [DateColumn] is empty THEN "value2" ELSE do nothing

 

What would a dax forumla that accomplishes the above look like? 

 

Does it matter that the data in one column is text and the other is a date? 

3 REPLIES 3
vega
Resolver III
Resolver III

Column = 
IF(
    Table1[TextColumn] = "value" && ISBLANK(Table1[DateColumn]),
    "value2",
    BLANK()
)
Anonymous
Not applicable

@vega Thanks for the reply! When I use your formula I get the error "Token Literal expected." When I click "show error" the second ampersand is highlighted (&&

Are you sure that you are using DAX? That formula works correctly as is if you are creating a calculated column in DAX. Are you trying to do the same thing that is being done here?

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.