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.
Hello everybody,
I am trying to extract the respective Type and Category value based on the Attribute number ("|" being the delimiter). To accomplish this, I am using the Text.BetweenDelimiters function. If the attribute is 1, for example, I want to extract the value between the first and the second delimiter. If the attribute is 2, I want to extract the value between the second and the third delimiter.
However, I am unable to reference the attribute column. The code below returns an error. How do we reference columns within M functions?
Text.BetweenDelimiters(_, "|", "|", each [Attribute]-1, 0)
Solved! Go to Solution.
@Anonymous
You may change it as follows.
Text.BetweenDelimiters([Category], "|", "|", [Attribute]-1, 0)
Thanks for your reply!
I managed to figure it out myself after I started this thread:
Text.BetweenDelimiters([Category],"|","|",(Int64.From([Attribute]))-1,0)
I needed the Int64 data type to have the function accept the value from the Attribute column.
Thanks again!
@Anonymous
You may change it as follows.
Text.BetweenDelimiters([Category], "|", "|", [Attribute]-1, 0)
Thanks for your reply!
I managed to figure it out myself after I started this thread:
Text.BetweenDelimiters([Category],"|","|",(Int64.From([Attribute]))-1,0)
I needed the Int64 data type to have the function accept the value from the Attribute column.
Thanks again!
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 |
---|---|
108 | |
98 | |
79 | |
66 | |
60 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |