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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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 4
dax
Community Support
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
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
Community Support
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

263.PNG264.PNG265.PNG

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.

Anonymous
Not applicable

Hi Zoe,

 

I dont want it in an expression.I have to fix the colour of the legend to certain limit. legend Colour palette should take it from below color Combinatios only.

 

"#93F0E6",
 "#60E6E1",
 "#42C9C2",
 "#27ACAA",
 "#109090",

 

 

Regards

Arjun V

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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