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.
I'm trying to get a specific element by index from a list obtained splitting a text by delimiter, but I don't find the right function for this goal. Using List.First or List.Last I can get first and last elements, but what function should I use to get an element by index?
MyText = "5;6;9" MyList = Text.Split(MyText, ";")
Thnaks a lot
Solved! Go to Solution.
You can specify the item position in curleybrackets
MyText = "5;6;9", MyList = Text.Split(MyText, ";"), Myitem=MyList{2}
You can specify the item position in curleybrackets
MyText = "5;6;9", MyList = Text.Split(MyText, ";"), Myitem=MyList{2}
I found I would have to use ;
MyText = "5;6;9", MyList = Text.Split(MyText, ";"), Myitem=MyList{1}
as the indexing seems to start at 0 for me not 1.
I guess this sis what you are after:
https://docs.microsoft.com/en-us/powerquery-m/list-range
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
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 |
---|---|
111 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |