Forum Discussion
Loading in varying columns in graph dynamically
Hi all,
I have the following problem. For a project I want to make a template dashboard that can be used for different data sheets (excel files in this case). Most of the data looks alike, but there are some columns that are named distinct depending on the data sheet.
This made me wonder if there is a way to dynamically select these columns in some way and automatically show them in a graph when adding the dataset to the project. At this moment I have two solutions but I do not know if they are possible in Power BI, these solutions are:
1. I have noticed that all those columns are numeric fields, so maybe I can just select all numeric fields and put them in a graph (if that is even possible).
2. Another option would be to foreach over the column name and check if they contain a certain keyword, but I wouldnt know how to do this either. And then dynamically add them as values in the graph
Are these options possible in Power Bi or are there better ways to achieve my goal?
either wont work cause you talking about changed that have to happend no the query side or the source, ummm you can create a second sheet with the columns renaming, get teh data transpond tha table, make a change value of the column name that convert to rows them transpond again and use first row as headers,
this can be done on power query
2 Replies
- StefanoGrimaldiResident Rockstar
either wont work cause you talking about changed that have to happend no the query side or the source, ummm you can create a second sheet with the columns renaming, get teh data transpond tha table, make a change value of the column name that convert to rows them transpond again and use first row as headers,
this can be done on power query
- AnonymousNot applicable
Hi MartijnBre ,
Agree with StefanoGrimaldi, you can try like the methods above.
Also, please see if the video helps:Dynamic Columns for Dynamic Visualizations in Power BI - Portland Power BI UG
If your problem has been solved, please mark the correct reply as the standard answer to help the other members find it more quickly.Thank you very much for your kind cooperation!
Hope it helps,
Community Support Team _ CaitlynIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.