March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |