Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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.
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
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
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...
@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
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!