- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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.
CompanyName | Date | SaleAmount |
CompanyA | 01/01/2019 | 29000 |
CompanyB | 01/02/2019 | 35000 |
Companyc | 01/03/2019 | 43000 |
CompanyA | 01/04/2019 | 27000 |
CompanyB | 01/05/2019 | 45000 |
Companyc | 01/06/2019 | 21000 |
CompanyA | 01/07/2019 | 26000 |
CompanyB | 01/08/2019 | 27285 |
Companyc | 01/09/2019 | 26035 |
CompanyA | 01/10/2019 | 24785 |
CompanyB | 01/11/2019 | 23535 |
Companyc | 01/12/2019 | 22285 |
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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])))
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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])))
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi Dedmon Dai - can you kindly have a look at - totally stuck
https://community.powerbi.com/t5/Desktop/Amend-measure-to-NOT-Sum-if-values-in-another-column-are-ze...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@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

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
08-26-2024 08:09 AM | |||
11-10-2024 09:41 PM | |||
08-13-2024 08:55 PM | |||
06-17-2024 10:00 AM | |||
Anonymous
| 07-22-2024 06:32 PM |
User | Count |
---|---|
87 | |
81 | |
53 | |
38 | |
35 |