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.
Why do these give an error:
= Table.AddColumn(#"Changed Type, "COMPARE", each if[TEXT]<>[TEXT.1] then Text.Length([TEXT]) &" vs. "& Text.Length([TEXT.1]) else "=")
= Table.AddColumn(#"Changed Type, "COMPARE", each if[TEXT]<>[TEXT.1] then Text.Combine({Text.Length([TEXT]), Text.Length([TEXT.1])}, " vs. ") else "=")
= Table.AddColumn(#"Changed Type, "COMPARE", each if[TEXT]=[TEXT.1] then "=" else Text.Length([TEXT]) &" vs. "& Text.Length([TEXT.1]))
= Table.AddColumn(#"Changed Type, "COMPARE", each if[TEXT]=[TEXT.1] then "=" else Text.Combine({Text.Length([TEXT]), Text.Length([TEXT.1])}, " vs. "))
Alternatives? (I want to be able to "see" the diff between 2 text columns.)
Solved! Go to Solution.
it would have been easier to help you if you had written the error it gives you for each of the expressions.
For example, for the former, the problem could be that Power Query cannot concatenate numbers and text.
For this you should convert the numeir to text. Thus, for example:
= Table.AddColumn(#"Changed Type, "COMPARE", each if[TEXT]<>[TEXT.1] then Text.From(Text.Length([TEXT])) &" vs. "& Text.From(Text.Length([TEXT.1])) else "=")
...
it would have been easier to help you if you had written the error it gives you for each of the expressions.
For example, for the former, the problem could be that Power Query cannot concatenate numbers and text.
For this you should convert the numeir to text. Thus, for example:
= Table.AddColumn(#"Changed Type, "COMPARE", each if[TEXT]<>[TEXT.1] then Text.From(Text.Length([TEXT])) &" vs. "& Text.From(Text.Length([TEXT.1])) else "=")
...
You're right (of course)!! (Still learning)
Expression.Error: We cannot apply operator & to types Number and Text.
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 |
---|---|
102 | |
53 | |
21 | |
13 | |
11 |