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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Monthly Sales

Hi

I need to show the sales for all 12 months as well as the total sales for all 12 months on the same axis on a bar chart. How would I add total sales for 12 months to the calculation?

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, 

Please check the below picture and the attached pbix file.

One of many ways to solve it is to create disconnected axis table.

 

Axis Table New =
UNION (
SUMMARIZE ( 'Calendar', 'Calendar'[Month Name], 'Calendar'[Month] ),
ROW ( "Month Name", "Total", "Month", 13 )
)
 
And then create a measure like below.
 
Sales Total: =
SWITCH (
TRUE (),
SELECTEDVALUE ( 'Axis Table New'[Month Name] ) = "Total", SUM ( Data[Sales] ),
CALCULATE (
SUM ( Data[Sales] ),
TREATAS ( VALUES ( 'Axis Table New'[Month] ), 'Calendar'[Month] )
)
)
 
Picture1.png
 
 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

5 REPLIES 5
v-robertq-msft
Community Support
Community Support

Hi, 

In my opinion, I still suggest you to mark Jihwan_Kimb’s reply as a solution because he has achieved the original requirement you posted in the case title.

What’s more, the new requirement you posted can not be achieved in the Power BI in my opinion. Because you can not set the X-axis or data values manually neither in the column chart nor in the dataset tables. They are all based on the data source you connected to the Power BI desktop.

 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

Jihwan_Kim
Super User
Super User

Hi, 

Please check the below picture and the attached pbix file.

One of many ways to solve it is to create disconnected axis table.

 

Axis Table New =
UNION (
SUMMARIZE ( 'Calendar', 'Calendar'[Month Name], 'Calendar'[Month] ),
ROW ( "Month Name", "Total", "Month", 13 )
)
 
And then create a measure like below.
 
Sales Total: =
SWITCH (
TRUE (),
SELECTEDVALUE ( 'Axis Table New'[Month Name] ) = "Total", SUM ( Data[Sales] ),
CALCULATE (
SUM ( Data[Sales] ),
TREATAS ( VALUES ( 'Axis Table New'[Month] ), 'Calendar'[Month] )
)
)
 
Picture1.png
 
 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

So I would like my growth to look like the below with the individual months, 3 months, 6 months and 12 months after selecting November

kcanterbury_0-1635943284979.png

 

Anonymous
Not applicable

Hi

The solutions seems like it will work. Unfortunately the requirement changed and I now need to display the sales growth instead of sales for the individual months, total sales for 3 months once a selection is made, as well as 6 months and 12 months. How would I go about achieving this? 

amitchandak
Super User
Super User

@Anonymous , refer this solution

https://community.powerbi.com/t5/Desktop/Grand-Total-in-Bar-Chart/m-p/612631

 

or

 

https://www.youtube.com/watch?v=5M3fBLUefXU

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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