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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Damian88
Frequent Visitor

Monthly Average as accessory line for other lines from legend

Hi,

 

I have a problem and i cant find solution enywere. I hope that someone already solved such case

 

I have a table with sales Values for different products and Shops (Sales - Product_name, Shop_ID, Value),

this table has relation with Shop list (Shop_ID, Territory_ID) and this table has relation with employee list (Territory_ID + Username)

 

I want to create a line chart by months with Market Share% for prodyct X with employee list and Market Share% for whole Team

 

Unfortynately there is no option to add more than one Field in Legend (wnen I add "Username" there is no option to show Value for whole team in the same Chart)

 

I dont want to create Measure for each Username because they will be changing. any Idea ?

 

Thank you!

 

 

5 REPLIES 5
FreemanZ
Super User
Super User

hi @Damian88 

could you depict your expected chart visually?

Hi,

 

Please Find bellow

 

Measure is :

Market Share % =
VAR _Selecte_Product = Sum(Value)
VAR _All_Products = Calculate(Sum(Value),Removefilters(Product_Name)
Return
Divide(_Selected_Product,_All,Products,0)

 

 

Line Chart.jpg

hi @Damian88 

 

Try to plot two visuals with a measure like:

A Share % = 
VAR _avalue = 
CALCULATE(
    SUM (Table1[Value]),
    Table1[Product_Name] = "A"
)
VAR _allvalue = 
CALCULATE(
    SUM(Table1[Value]),
    ALL(Table1[Product_Name])
)
Return
Divide(_avalue, _allvalue, 0)

 

it worked like:

FreemanZ_0-1676801722519.png

 

Indeed, Excel has better flexibility for your case. 

 

If you don't have too many employee_id, you can write a measure for each. 

If you have too many employee_id, then the linechart will be very crowed. 

I Thnx for You answer, unfortunatelly it dont cover my case

 

I forgot to tell that there are few different Teams so employee_id will be dynamic based on a slicer (always arround 5/6 employee_id + Value for Team) so I cant create Measure for all of them.

 

I was more thinking, if there is option to 2 level Grouping - legend Fields option (i know that I can group Employees in and see on chart Value For Team but in this case legend wont show me singe emplyees)

Grups.jpg

and ofcourse it has to be on one chart 😕

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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