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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

How to access cell values from table data view?

I've got a simple table from which I want to get some values by accessing the table cells via row index and column index.

Unfortunately I've got no clue how I can achieve this...

I'm messing around in visual.ts with some TS code, but don't know what properties of the table dataview I have to use.

 

Is it even possible with the table dataview? Or do I really have to go the categorical way?

I don't need any aggregation (like sum), just the values...

 

Any help is welcome, thanks in advance!

 

Karl83_0-1613492254080.png

Karl83_1-1613492294915.png

Karl83_2-1613492389778.png

1 ACCEPTED SOLUTION
dm-p
Super User
Super User

Hi @Anonymous,

The details of the table data view mapping are supplied in the docs, including some output based on a sample dataset, but to break this down further:

You can access rows as table.rows[x] where x is a 0-based index, exactly like a JavaScript array.

Each row is an array of column values, so table.rows[x][y], where y is the index of the column you want the value for.

If you need to know which index represents which column, the column metadata is in the table.columns array. The index of each item corresponds with the index in the resulting rows array.

So, for example if your table.columns[0] entry represents 'Jahr' then table.rows[x].[0] will be the value of 'Jahr' for the given row entry.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




View solution in original post

2 REPLIES 2
dm-p
Super User
Super User

Hi @Anonymous,

The details of the table data view mapping are supplied in the docs, including some output based on a sample dataset, but to break this down further:

You can access rows as table.rows[x] where x is a 0-based index, exactly like a JavaScript array.

Each row is an array of column values, so table.rows[x][y], where y is the index of the column you want the value for.

If you need to know which index represents which column, the column metadata is in the table.columns array. The index of each item corresponds with the index in the resulting rows array.

So, for example if your table.columns[0] entry represents 'Jahr' then table.rows[x].[0] will be the value of 'Jahr' for the given row entry.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Anonymous
Not applicable

That helped. Thank you, dm-p!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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