Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Power bi

Am Currently working on a project where i have to convert the tableau files to power bi report.

Details:

 

1. I have to create a stacked bar chart using the following item

 

ID, productname, amount, time period

 

X axis =time period,

Y axis = Amount,

Legend =ProductName

data colours =colour1 and colour 2

For any selected ID, there will be only 2 product name(legend) and legend should be either colour 1 or colour 2

Please help me out with ideas to implement this.

4 Replies

  • dax's avatar
    dax
    Community Support

    Hi ArjunV_07,

    It seems that you want to create powerbi report based on tableau's data, right? If so and if possible, could you pleaes inform me more detailed information(such as your sample data and your expecting output)? Then I will help you  more correctly.

    Please do mask sensitive data before uploading.

    Thanks for your understanding and support.
    Best Regards,
    Zoe Zhi

    • Anonymous's avatar
      Anonymous
      Not applicable

      As per my knowledge data colours pick the colour randomly from the colour palette.

      In my case For selected id  there will be 2 products will come .data colour should posses only 2 colours

       

      SO any ID there will be only 2 colours for the legend irrespective of the product(RED or BLUE).

      In Chart there will be one ID only we can select .For that ID can having 2 product

      EG :

      1D

      PRD

      Colour

      1

      A

      RED

      1

      B

      Blue

       

       

       

      2

      C

      BLUE

      2

      A

      RED

       

       

       

      3

      D

      RED

      3

      E

      BLUE

      • dax's avatar
        dax
        Community Support

        Hi ArjunV_07,

        According to your description, it seems that you want to show legend color based on value, right? If you add legend, you can't change legend color based on value. So workaround is that you could design your chart like below(your sample data )

        idprocolorAMOUNTperiod

        1 A RED 1 2019/1/1
        1 B BLUE 2 2019/1/1
        2 A RED 5 2019/1/1
        2 C BLUE 10 2019/1/1
        3 E RED 5 2019/1/1
        3 D BLUE 6 2019/1/1
        1 C PINK 5 2019/1/2
        1 D BLUE 12 2019/1/2
        2 E YELLOW 5 2019/1/2
        2 A BLUE 6 2019/1/2
        3 B RED 2 2019/1/2
        3 C BLUE 6 2019/1/2

        Best Regards,
        Zoe Zhi

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