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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

How to get multiple category lines with bar chart

Hi Experts

 

I want to be able to show a single bar chart and the individual lines that make up that bar chart on a line and bar chart graph.

 

1. Bar lines should tell overall sales amount by month.

2. multiple lines should represent company sales amount.

 

CompanyNameDateSaleAmount
CompanyA01/01/201929000
CompanyB01/02/201935000
Companyc01/03/201943000
CompanyA01/04/201927000
CompanyB01/05/201945000
Companyc01/06/201921000
CompanyA01/07/201926000
CompanyB01/08/201927285
Companyc01/09/201926035
CompanyA01/10/201924785
CompanyB01/11/201923535
Companyc01/12/201922285

 

 

1 ACCEPTED SOLUTION
v-deddai1-msft
Community Support
Community Support

Hi @Anonymous ,

 

You can create a disconnected table:

 

Table 2 = UNION(ROW("legend","overall"),VALUES('Table'[CompanyName]))

 

Then you can use stacked area chart for instead  with the following measure:

Measure = IF(MAX('Table 2'[legend]) = "overall",CALCULATE(SUM('Table'[SaleAmount]),ALL('Table'[CompanyName])),CALCULATE(SUM('Table'[SaleAmount]),TREATAS(VALUES('Table 2'[legend]),'Table'[CompanyName])))

 

Capture4.PNG

 

Please refer to the pbix file.

 

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

 

Best Regards,

Dedmon Dai

 

View solution in original post

3 REPLIES 3
v-deddai1-msft
Community Support
Community Support

Hi @Anonymous ,

 

You can create a disconnected table:

 

Table 2 = UNION(ROW("legend","overall"),VALUES('Table'[CompanyName]))

 

Then you can use stacked area chart for instead  with the following measure:

Measure = IF(MAX('Table 2'[legend]) = "overall",CALCULATE(SUM('Table'[SaleAmount]),ALL('Table'[CompanyName])),CALCULATE(SUM('Table'[SaleAmount]),TREATAS(VALUES('Table 2'[legend]),'Table'[CompanyName])))

 

Capture4.PNG

 

Please refer to the pbix file.

 

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

 

Best Regards,

Dedmon Dai

 

Anonymous
Not applicable

amitchandak
Super User
Super User

@Anonymous , As of now with standard visual you can not have lines split by the legend in case of clustered bar visual.

 

You can only have that in the line visual with both axes. (Secondary line be only one)

 

Or check some custom visual

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors