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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
jithesh
New Member

Total in the bar chart

Hi,

 

I have month on month sales data. I want to show the total also in the graph. I want sales in the X axis and the managre names in the Y axis. Month as Legend.

 

ManagerSalesMonth
Andy92925Aug-20
Brad5672Aug-20
Cooper4861Aug-20
David3525Aug-20
Emily347Aug-20
Frank311Aug-20
Henry12Aug-20
Glen1Aug-20
Andy92743Sep-20
David3436Sep-20
Cooper1023Sep-20
Emily221Sep-20
Glen81Sep-20
Frank72Sep-20
1 ACCEPTED SOLUTION
v-janeyg-msft
Community Support
Community Support

Hi, @jithesh 

 

It’s my pleasure to answer for you.

According to your description,I think you may need to create a table with a single column,then use this column in the visual instead of 'manager',then create a measure instead of values.

Like this:

Table 2 = UNION(DISTINCT('Table (2)'[Manager]),ROW("Manager","Total"))

Measure =
IF (
    SELECTEDVALUE ( 'Table 2'[Manager] ) = "Total",
    SUMX (
        FILTER ( ALL ( 'Table (2)' ), [Month] = SELECTEDVALUE ( 'Table (2)'[Month] ) ),
        [Sales]
    ),
    SUMX (
        FILTER (
            ALL ( 'Table (2)' ),
            [Month] = SELECTEDVALUE ( 'Table (2)'[Month] )
                && [Manager] = SELECTEDVALUE ( 'Table 2'[Manager] )
        ),
        [Sales]
    )
)

 5.png

Here is my sample .pbix file.Hope it helps.

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

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

4 REPLIES 4
v-janeyg-msft
Community Support
Community Support

Hi, @jithesh 

 

It’s my pleasure to answer for you.

According to your description,I think you may need to create a table with a single column,then use this column in the visual instead of 'manager',then create a measure instead of values.

Like this:

Table 2 = UNION(DISTINCT('Table (2)'[Manager]),ROW("Manager","Total"))

Measure =
IF (
    SELECTEDVALUE ( 'Table 2'[Manager] ) = "Total",
    SUMX (
        FILTER ( ALL ( 'Table (2)' ), [Month] = SELECTEDVALUE ( 'Table (2)'[Month] ) ),
        [Sales]
    ),
    SUMX (
        FILTER (
            ALL ( 'Table (2)' ),
            [Month] = SELECTEDVALUE ( 'Table (2)'[Month] )
                && [Manager] = SELECTEDVALUE ( 'Table 2'[Manager] )
        ),
        [Sales]
    )
)

 5.png

Here is my sample .pbix file.Hope it helps.

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

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

jithesh
New Member

jithesh_0-1605017496518.png

This is the example I am looking for...

jithesh
New Member

Hi Phil

It should be the overall sales for each manager.

PhilipTreacy
Super User
Super User

Hi @jithesh 

Total for what? Month? Manager? Overall?

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.