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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
MartijnBre
New Member

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?

 

 

1 ACCEPTED SOLUTION
StefanoGrimaldi
Resident Rockstar
Resident 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





Did I answer your question? Mark my post as a solution! / Did it help? Give some Kudos!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
v-xiaoyan-msft
Community Support
Community Support

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 _ Caitlyn

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

StefanoGrimaldi
Resident Rockstar
Resident 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





Did I answer your question? Mark my post as a solution! / Did it help? Give some Kudos!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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