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

Legend is not allowing when in values section two measures are used

Hi Community,

 

Whenever I am using two or more measures in Values shelf either in "Bar Chart" or "Line Chart". In Legend shelf I am unable to drag any field.

 

For Sample data I am attaching here the link:

https://drive.google.com/file/d/1MLtUQZpE0T2IpltYY591zwSthfsIhLqw/view?usp=sharing

 

In one of them, my requirement will get solved if power bi allows that. So please guide me regarding this or any alternative to achieve my requirement. i.e:

line break.JPG

 

 

As you can see 2 different years having 2 different colors. In axis, I am using week number, in legend I want to use year with two different measure( one thick line, one thin line) as you can see above.

 

 

Best Regards,

Ravi

2 ACCEPTED SOLUTIONS
v-jiascu-msft
Employee
Employee

Hi Ravi,

 

Please download the workaround in the attachment. It's a limitation for now. I would suggest you vote up these ideas.

line-chart-with-multiple-values-fields-and-legends and two-values-and-legend-on-line-chart.

The workaround is:

1. Pivot the [P1] and [P2] columns.

2. Add a custom column which will be used as a legend.

Legend-is-not-allowing-when-in-values-section-two-measures-are-used

 

Best Regards,
Dale

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

View solution in original post

Hi Ravi,

 

I tested the solution with 10.2 million rows and 20 columns. It's done in seconds. I think you can try it in the Production.

The two links are good in my side. Can you right click it can copy the address?

 

Best Regards,
Dale

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

View solution in original post

3 REPLIES 3
v-jiascu-msft
Employee
Employee

Hi Ravi,

 

Please download the workaround in the attachment. It's a limitation for now. I would suggest you vote up these ideas.

line-chart-with-multiple-values-fields-and-legends and two-values-and-legend-on-line-chart.

The workaround is:

1. Pivot the [P1] and [P2] columns.

2. Add a custom column which will be used as a legend.

Legend-is-not-allowing-when-in-values-section-two-measures-are-used

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thank you @v-jiascu-msft.

 

It worked but just 1 conformation I want Dale. As I haven't tested in production yet.

Could you please suggest that it will not affect too much with 10 million records. And I can not use this in some scenario because of the extra custom column as per client requirement. As developing purpose its just did a trick.

 

 

For Vote up, ideas, when I clicked to the link warning, popped out page not found.

 

 

Best Regards,

Ravi

Hi Ravi,

 

I tested the solution with 10.2 million rows and 20 columns. It's done in seconds. I think you can try it in the Production.

The two links are good in my side. Can you right click it can copy the address?

 

Best Regards,
Dale

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

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.