Forum Discussion
Dynamic Column Headers in Table Visual Based on JSON Data
- 6 months ago
In the image below, you'll need to add an index column to uniquely identify each row values in matrix are always aggregated.
Please see the attached pbix.
Hi Anonymous
This isn’t currently possible. Column headers in a table or matrix visual do not update dynamically. One approach is to use field parameters, but they are entirely manual — fields must be explicitly added when the parameter is set up, and any new fields added later also need to be added manually. Another approach is to unpivot your table, placing JSON keys in one column and their values in another; you’ll need to use a matrix visual to display it like a table, though this can increase refresh overhead.
Please see the attached pbix.
Hi danextian
Thanks for your reply. To fulfill my requirement, table or matrix - anyone would be fine, but do you see any issue with Matrix visual?
If you need sample data with pbix file, you can access here
Just the ask is, if this is doable and achievable, and the main concern is the future values in JSON columns are unknown.
Please take a look at the attached pbix and let me know in what best possible way we can display this.
- danextian6 months agoSuper User
Thigns to bear in mind when using matrix:
Sorting by row category must respect the hierarchy. Lower level headers are sorted within the context of hte upper level headers.
Column headers resulting from using a dimension cannot be sorted individualy like you can with a table.
And, unpivoting is done in the query editor so pbix alone is not enough as the data needs to be transformed.
- Anonymous6 months agoNot applicable
danextian Oops! I missed that I had done transformation. To help me on this, I have shared the sample data here
Summary - is the table which would be driving table
Details- is the table which has JSON values in a column
Please let me knoe if you need any clarification.- danextian6 months agoSuper User
The link is the same as initially posted