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
rmeng
Helper II
Helper II

Dax IF Condition with a Concatenation

I want a Dax with a IF Statement like this:

 

if [counts] = "Yes" then [date]&[mdm ID]&[User ID] else null

Can you Help me?

Untitled.jpg

 

1 ACCEPTED SOLUTION
AntrikshSharma
Community Champion
Community Champion

You already provided the solution yourself:

CC = IF ( [counts] = "Yes", [date] & [mdm ID] & [User ID], "null" )

 

View solution in original post

2 REPLIES 2
harshnathani
Community Champion
Community Champion

Hi @rmeng ,

 

Is this a Calculated Column or  a measure? 

 

For a Calculated Column

 

Calculated Column = if ('Table'[Count] = "Yes", 'Table'[date] & 'Table'[mdm ID] & 'Table'[User ID] , BLANK())


If [Count] is a measure.

Then create a measure

 

Measure = if ([Count] = "Yes", 'MAX(Table'[date]) & MAX('Table'[mdm ID]) & MAX('Table'[User ID]) , BLANK())

 

 


Regards,

Harsh Nathani


Appreciate with a Kudos!! (Click the Thumbs Up Button)

Did I answer your question? Mark my post as a solution!

AntrikshSharma
Community Champion
Community Champion

You already provided the solution yourself:

CC = IF ( [counts] = "Yes", [date] & [mdm ID] & [User ID], "null" )

 

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.

Top Solution Authors