Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |