Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Syndicate_Admin
Administrator
Administrator

How to reference value from a list in split function

Hi there,

 

I am trying to split a column by values from a list. I got the list ready and now wonder how I could reference the values from this list in the split column function. I don't want to manually update the position as the number could change. Tried multiple ways and searched online, but no luck.

 

Thank you so much! 

 

 

1 REPLY 1
Vijay_A_Verma
Super User
Super User

If you split it in Rows not in columns, then you just need to specify the PositionList.

Select your columns and while splitting choose Rows in place of Column under Advanced. Put any dummy value say 3 as position. Once split done, in formula bar, replace this 3 with name PositionList.

You will get this kind of split

= Table.ExpandListColumn(Table.TransformColumns(Source, {{"Text", Splitter.SplitTextByPositions(PositionList)}}), "Text")

We can make formula for vertical split as well but in my view this much complexity is not needed and also for Power BI, it is longer table rather than wider table which is needed.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors
Top Kudoed Authors