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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Dynamic bar chart legend using settings table

I'm fairly new to Powerbi and really could use some help.

 

I have created a dashboard that is being controlled by slicer where you can select a date. The data this action selects is then visualized in a stacked columnchart and divided using a legend:

fig1.png

red: class 3, green: class 2, yellow: class1

Currently, the data used to create this legend is static and located in a table. I want to make this legend dynamic based on settings I have in a different table. The table with settings looks like this:

 

Date     class    min   max

2001      1         11      18

2001      2         9        11

2001      3         1        9

2002      1         10      18

2002      2         9        10

2002      3         1        8

2003      1         13      18

2003      2         10      13

2003      3         1        10

 

So the colors should move according to these settings.

I have tried using several different methods, but not succeeded.

 

Thanks in advance for your help.

 

2 REPLIES 2
parry2k
Super User
Super User

@Anonymous can you share pbix file with sample data and setting data to get you the solution



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

@parry2k , thanks for your reply. I can't share the real file or real data, due to it containing customer data. So, I generated some data using the approx. normal distribution and created a quick dashboard containing the relevant graph. I couldn't attach the file in the post so as a work around you can download the file via the following link:  https://drive.google.com/open?id=1OulJq05ipSgNN6CwHSiffmfxPWzPxgL3 

 

Good luck and thank you in advance for the effort!

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors