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 folks,
I'm stumped at this problem and tried to make it simpler by chopping the column [Language] into two columns by delimeter "-" but it doesn't seem to solve my issue.
So here's what I'm trying to do. I have two columns 1) SourcePropertyDisplayName and 2) Lanugage
Source Property Display Name column has 2 or 3 list of app names that come in the data set as below:
Global IOS App US/UK
Global Android App US/UK
Language column has data that come up as : en-en or fr-fr or en-pt or en-us and some more.
I'm trying in Power Query to combine an 'if' statement to look at 'SourcePropertyDisplayName' and Language (last 2 letter's) and come up with a 'SourcePropertyDisplayNameMain'
So if SourcePropertyDisplayName is Global IOS App US/UK and Lanugage is 'fr-fr' than a new name would come up ina column as 'Global IOS App US/UK French' and if language is anything other than fr-fr than it should be 'Global IOS App US/UK English'.
Here's what I wrote but my m language doesn't work.
if [Source Property Display Name] ="Global IOS App US/UK" and left 2[Language] = "fr" then "Global Global IOS App US/UK French" else " Global IOS App US/UK English"
Hi @Anonymous ,
You were almost there.
if [SourcePropertyDisplayName] = "Global IOS App US/UK" and Text.Start([Language], 2) = "fr" then "Global Global IOS App US/UK French" else "Global IOS App US/UK English"
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel
Proud to be a Super User!
Thanks so much Nathaniel! If I have let's say 3 sourceNames as I mentioend above, do i keep repeating the if then statement 3 times or nest it somehow?
Hi @Anonymous ,
if [SourcePropertyDisplayName] = "Global IOS App US/UK" and Text.Start([Language], 2) = "fr" then "Global Global IOS App US/UK French" else if [SourcePropertyDisplayName] = "x" then "y" else "Global IOS App US/UK English"
Yes, so I added another condition if x then y in between. Look at the picture, shows you three results. If you are getting into this, let me recommend @KenPuls book, M is for (DATA) Monkey. Easy read and really useful.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel
Proud to be a Super User!
Proud to be a Super User!
thanks much @JarroVGIT even though this came up in my search never thought about using it.
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 |
---|---|
113 | |
97 | |
84 | |
67 | |
60 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |