cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MossyD
Regular Visitor

DAX New Column and Substitute

Hi All
I am trying to understand how to create a new column from one table to within another table and replace any blanks within the new column with "No Record" text.

The following does not replace the Blanks with text. But, I am unsure how to structure my code...

UPN = SUBSTITUTE(RELATED(users[userPrincipalName]), "", "No Record")

Could anyone please help me to understand?

Many thanks

1 ACCEPTED SOLUTION
Pragati11
Super User III
Super User III

Hi @MossyD ,

 

You can try a calculated column as follows:

UPN = IF(RELATED(users[userPrincipalName]) = BLANK(), "No Record", RELATED(users[userPrincipalName]))

 

Thanks,

Pragati


My Blog: Data Vibe
Connect: LinkedIn
Connect: Twitter






If this helps, Appreciate a KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




View solution in original post

2 REPLIES 2
MossyD
Regular Visitor

Thank you @Pragati11 

Yes. Your solution worked for me.

I also, worked out the following solution...

UPN =
VAR UPNList = RELATED(users[userPrincipalName])
RETURN
IF(UPNList = "", "No Record", UPNList)
Pragati11
Super User III
Super User III

Hi @MossyD ,

 

You can try a calculated column as follows:

UPN = IF(RELATED(users[userPrincipalName]) = BLANK(), "No Record", RELATED(users[userPrincipalName]))

 

Thanks,

Pragati


My Blog: Data Vibe
Connect: LinkedIn
Connect: Twitter






If this helps, Appreciate a KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




View solution in original post

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Top Solution Authors
Top Kudoed Authors