March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi everyone,
I have a marketing database with thousands of email addresses and company names and I import all these data in Power Bi.
Unfortunately our system doesn't talk with our CRM and this is a problem cause when people go on our Power Bi dashboard they filter a company name using the one on our CRM system but it might happen that the company's name on Power Bi is different. An example would be like below:
Marketing
Company name = Water for Sport
CRM:
Company name = Water Sport
Now a way that I have found to fix this issue is using the conditional statement 'IF - Then' in Power Bi. For instance I can say: If email address contains @watersport.com then company name is 'Water for Sport'.
The above logic works perfectly however in this type of statement there is then the option 'else'. This results to be a problem for my specific case cause as i said before I have thousands of companies and actually the ones I am interested to 'trim' are just around 200. If I proceed with this approach I will then loose all the other companies for which I don't set up a rule.
I was wondering then if there is a way to use the 'If and then' statement ignoring the 'Else' command. Just to let you know if I leave the 'else' blank then all the other companies won't appear.
Thanks in advance,
Alessandro
Solved! Go to Solution.
If you are doing this in Power Query and creating a Custom Column, then you are checking an existing column to check the email address. If you don't find the text you are searching for, the else can just output this unmodified column - for example
if Text.Contains([Email_Address] , "@watersport.com") then "Water for Sport" else [Email_Address]
Phil
Proud to be a Super User!
I'm not sure I understand fully. You can perhaps do something like:
= if Text.Contains([emailaddress], "@watersport") then "Water for Sport" else [emailaddress]
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
I'm not sure I understand fully. You can perhaps do something like:
= if Text.Contains([emailaddress], "@watersport") then "Water for Sport" else [emailaddress]
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
If you are doing this in Power Query and creating a Custom Column, then you are checking an existing column to check the email address. If you don't find the text you are searching for, the else can just output this unmodified column - for example
if Text.Contains([Email_Address] , "@watersport.com") then "Water for Sport" else [Email_Address]
Phil
Proud to be a Super User!
Thank you very much, it worked perfectly!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
133 | |
90 | |
88 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
70 | |
68 |