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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors