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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Table indexing

I know I can access access data in a table as follow ...Table[column]{#}

where # is any number but just one.  is there any way to include two columns or to enter to numbers of rows? something like table[[column1,column2]]{0,1,2}

I know that is not gonna work but I hope you get what I am trying to do and show me a way out

 

Thnkas!

 

1 ACCEPTED SOLUTION
v-xuding-msft
Community Support
Community Support

Hi @Anonymous ,

 

You could add an index column to filter rows. And use "Choose column" feature to filter columns or go to the specific column.

2.gif

 

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-xuding-msft
Community Support
Community Support

Hi @Anonymous ,

 

You could add an index column to filter rows. And use "Choose column" feature to filter columns or go to the specific column.

2.gif

 

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
CNENFRNL
Community Champion
Community Champion

Hi, @Anonymous , access to a specific column/row/cell is really a pain in the axx compared with Excel; sometimes it could be as verbose as such, (supposing we need "Column1", "Column2" from table)

 

Table.SelectColumns(table, List.Select(Table.ColumnNames(table), each Text.End(_, 1) <= "2"))

 

Annoying as it is, it provides some flexibilies and code robust in the meantime.

M language would be more fun if only MS provided a full, more delicated set of documentation!


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Fowmy
Super User
Super User

@Anonymous 

Say your table looks like:

Fowmy_0-1600670224225.png


You insert a step as 

= Table.FirstN(Table.SelectColumns(Source, {"Column1", "Column2"}),3)

 

Fowmy_1-1600670340741.png


Full Code which you can paste in a blank query:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("NY3LFcAgCAR74ewh+MFQi8/+2wgj5uA+3GHZtaRLEa0h8w1xZFTZZYmDXEMqXB8mPWjiGoY2og7yTN35P3i+SQjx+qDEWLEkx2CbymbZtvcH", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t, Column4 = _t, Column5 = _t]),
    Custom1 = Table.FirstN(Table.SelectColumns(Source, {"Column1", "Column2"}),3)
in
    Custom1

 

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

 



 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors