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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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