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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
joarvat
Regular Visitor

Can I access elements of a list in DAX?

It looks to me that it is possible to place a list in a column by using {"element1","element2","element3"}.  But what I have not seen is whether it is possible to access the elements of that list.  (I want to stress that I'm talking about DAX, here, NOT Power Query).  So I have tried various methods like [ListColName][1], [ListColName]{1}.

 

Why would I want to do something like that?  I am doing what I think is a fairly expensive operation on a large table.  I create a temporary table as a variable, and there are 3 columnvalues from that temporary table I am interested in.  So my thought was that instead of doing this expensive operation 3 times and create 3 new columns, why not get hold of those 3 values the first time, put them in a list, and then just access that list, an operation that should be faster.  I can't find any way of doing this.

2 REPLIES 2
joarvat
Regular Visitor

Yes, I ended up using Left and Right in a comma-separated text to get two of the values.  But this is only really practical for 2 values.  I did not find a solution to what I wanted to do, and I don't think it exists.  The third value I used another method to get.

swikritee_p
Resolver II
Resolver II

@joarvat , In DAX, using search and Left, Right and Mid to get data from a list. But Power Query is the best option on a large table

 

You can refer to these links, in case you need some reference

Power Query Split Column , Split Column By Delimiter: https://youtu.be/FyO9Vmhcfag

Text Operations- Mid, Left, Right: https://www.youtube.com/watch?v=-KChpAz_fUo&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=47

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors