Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

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:

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

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

    • Anonymous's avatar
      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!