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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Syndicate_Admin
Administrator
Administrator

Total Line Bar Chart

Hello, I have a database in which sales to different countries and in different years appear.

I have created a graph with the TOP 4 countries to which the most quantity has been sold (on the 'y-axis' the quantity and on the 'x-axis' the years).

What I'd like to do is create a line in the bar chart that shows the total sales to all countries.
What I manage to do is that this line shows me the total sales of those 4 countries added together, but I want the total, that is, that the TOP filter does not affect the 'secondary y-axis' and the line. Is this possible? Thank you!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Syndicate_Admin ,
Here some steps that I want to share, you can check them if they suitable for your requirement.
Here is my test data:

vheqmsft_0-1709536731964.png

1. Create a measure

Total Sales = CALCULATE(SUM([Sales]), REMOVEFILTERS('Table'[Sales],'Table'[Year]))

2.Choose Line and clustered column chart

vheqmsft_1-1709536867413.png

vheqmsft_2-1709536898634.png
Final output

vheqmsft_3-1709536926850.png

 

 

 

Best regards,

Albert He

 

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

2 REPLIES 2
Anonymous
Not applicable

Hi @Syndicate_Admin ,
Here some steps that I want to share, you can check them if they suitable for your requirement.
Here is my test data:

vheqmsft_0-1709536731964.png

1. Create a measure

Total Sales = CALCULATE(SUM([Sales]), REMOVEFILTERS('Table'[Sales],'Table'[Year]))

2.Choose Line and clustered column chart

vheqmsft_1-1709536867413.png

vheqmsft_2-1709536898634.png
Final output

vheqmsft_3-1709536926850.png

 

 

 

Best regards,

Albert He

 

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

 



Jonvoge
Super User
Super User

Hi!

 

You'll need to create a Calculated Measure like the following, to return the total sales for all countries:

 

Measure = 

Calculate(Sum(SalesAmount), All('Table', 'Table'[Country])

 

The 'All' function removes all filters from the Country column.

Try the above measure in your visual, and see if it works!

_____________________________________________________
I hope my comment was helpful.
If your question was answered, please mark your post as 'Solved' and consider giving me a 'Thumbs Up'.
Find me on LinkedIn, Sessionize, or my blog Downhill Data

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.