Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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!
User | Count |
---|---|
139 | |
113 | |
103 | |
73 | |
63 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |