Forum Discussion

dreyz64's avatar
dreyz64
Helper III
6 years ago

Dynamic Legend on a stacked column chart

Hello everyone,

 

I am trying to create a stacked column chart with a legend that can be changed via a slicer.

In Tableau it is very easy to do: I create a calculated field where I say "CASE parameterLegend when "SHOP", [Shop]

when "Market", [Market], etc..

Basically I tell my calculated field to take the values of the column shop if my parameter for my legend is equal to shop and so on.

I wanted to do the same thing in PBI: create a custom column where the values inside would take the values of the column i want to use as a legend.

However i cannot find a way to do this...
I have tried to illustrate what I want to do in the image below.
Thanks a lot for the help!

 

 

5 Replies

  • dreyz64 you are looking dynamic x-axis, check this video, hope it helps.

     

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

     

     

    • dreyz64's avatar
      dreyz64
      Helper III

      parry2k  I am looking at a dynamic Legend (the colors), not the X axis which is fixed (or Y axis for that matter).