Forum Discussion
Accessing row data from table or matrix data view mapping.
- 8 years ago
Please use table data-mapping instead of matrix since you need to rows only and there's no need to generate a hierarchy.
Please use options.dataViews[0].table.rows to enumerate data-rows.
You can console log the data view object to understand its structure deeper.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
Thank you Ignat for your response! I had tried that, but my mistake was doing it like this:
"table": {"rows": { "select": [
{"for": {"in": ["measuredDepth","isPlanned"]}}
]
}}
I got an error that "in" cannot accept an array, so I wrongly concluded that it could only accept a single field. This works nicely:
"table": {"rows": { "select": [
{"for": {"in": "measuredDepth"}},
{"for": {"in": "isPlanned"}}
]
}}
Thanks again!
Thanks for posting your solution, but could you also tell how it is possible to access the content of a special table cell (e.g. row=3, column=1) from the table in typescript?
Or can anybody else help with this?