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!
This sounds like a simple fix but I can't find the solution anywhere. I want to write a conditional if statment based on the machine codes in our plant. For example if the machine code is a numeral and a character (ex: "4H") I want it to print a specific name. The other case is to look at just the second letter and print the res tof the machine names. An example would be "XA34" and the logic would look at just "A" and print the name.
Thanks in advance for your help!
Solved! Go to Solution.
Hi @Anonymous ,
Please refer to the following custom colum in power query:
let
result = try Number.From(Text.At([Column1],0)) otherwise "Text",
resultType = if result = "Text" then Text.At([Column1],1) else "xxxxxxxxxxx"
in
resultType
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
@Anonymous , these will help
https://docs.microsoft.com/en-us/powerquery-m/text-functions
https://docs.microsoft.com/en-us/powerquery-m/text-at
example
Text.At("Hello, World", 4)
I got the second case sorted out using Text.At.
Hi @Anonymous ,
Please refer to the following custom colum in power query:
let
result = try Number.From(Text.At([Column1],0)) otherwise "Text",
resultType = if result = "Text" then Text.At([Column1],1) else "xxxxxxxxxxx"
in
resultType
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
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 |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |