Forum Discussion
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.
| Manager | Sales | Month |
| Andy | 92925 | Aug-20 |
| Brad | 5672 | Aug-20 |
| Cooper | 4861 | Aug-20 |
| David | 3525 | Aug-20 |
| Emily | 347 | Aug-20 |
| Frank | 311 | Aug-20 |
| Henry | 12 | Aug-20 |
| Glen | 1 | Aug-20 |
| Andy | 92743 | Sep-20 |
| David | 3436 | Sep-20 |
| Cooper | 1023 | Sep-20 |
| Emily | 221 | Sep-20 |
| Glen | 81 | Sep-20 |
| Frank | 72 | Sep-20 |
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] ) )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.
4 Replies
- v-janeyg-msft
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] ) )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.
- PhilipTreacy
Super User
- jitheshNew Member
Hi Phil
It should be the overall sales for each manager.
- jitheshNew Member
This is the example I am looking for...