Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi,
I currently have this bar chart:
The orange bar is total company, the green bars are for each department.
It is currently an illusion though, as it is simply two different charts positioned side by side.
Is it possible to create a single chart that displays a total bar as well as individual bars?
Solved! Go to Solution.
yes you can
add to your dimension table a total row. (this way the total will be displayed ).
then in you measure write an swtich statement :
m=
var total = calculate ( [sales amount]) , removefilters( dim[name]))
var current = [sales amount]
return switch(
true () ,
selectedvalue(dim[name] = "Total" total ,
current
)
hope this helps.
Note :
create variables
Hi @Fusilier This is possible to acheive. To show total in clustered bar/column chart follow the steps.
1. First create a table with distinct category, for your case department and add total row with it. You can use union function. For example, I have used region :
All_Region = UNION(DISTINCT('Sales Territory'[Sales Territory Region]), {"All Region"})
2. Create a relationship one to many with the original dimension table. See image below:
3. Create a measure to evaluate Totals for all category and individual category. See example :
Total_Sales_All_Region =
VAR _total = CALCULATE([Total Sales], ALL(All_Region[Sales Territory Region]))
VAR _result =
SWITCH(
TRUE(),
SELECTEDVALUE(All_Region[Sales Territory Region]) = "All Region", _total, [Total Sales]
)
RETURN
_result
4. Now you can create column or bar chart using the newly created column and measure. See Image below:
Hope this helps!!
If, Please accept it as a solution!!
Best Regards,
Shahariar Hafiz
Hi @Fusilier This is possible to acheive. To show total in clustered bar/column chart follow the steps.
1. First create a table with distinct category, for your case department and add total row with it. You can use union function. For example, I have used region :
All_Region = UNION(DISTINCT('Sales Territory'[Sales Territory Region]), {"All Region"})
2. Create a relationship one to many with the original dimension table. See image below:
3. Create a measure to evaluate Totals for all category and individual category. See example :
Total_Sales_All_Region =
VAR _total = CALCULATE([Total Sales], ALL(All_Region[Sales Territory Region]))
VAR _result =
SWITCH(
TRUE(),
SELECTEDVALUE(All_Region[Sales Territory Region]) = "All Region", _total, [Total Sales]
)
RETURN
_result
4. Now you can create column or bar chart using the newly created column and measure. See Image below:
Hope this helps!!
If, Please accept it as a solution!!
Best Regards,
Shahariar Hafiz
yes you can
add to your dimension table a total row. (this way the total will be displayed ).
then in you measure write an swtich statement :
m=
var total = calculate ( [sales amount]) , removefilters( dim[name]))
var current = [sales amount]
return switch(
true () ,
selectedvalue(dim[name] = "Total" total ,
current
)
hope this helps.
Note :
create variables
User | Count |
---|---|
98 | |
75 | |
73 | |
49 | |
26 |