Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hi everyone,
i am looking for help with an issue im facing,
i have 3 types of product which i need to show the bar chart for.
but i also need to show the total of all the columns (which i was able to figure out)
and i am also required to show only the sum of 2 of these products
Solved! Go to Solution.
Hi @Guneet_B21 ,
I think there should be a [Type] column and a [Cal] column in your table. We need to create a table with all data you need and add the column into X aixs.
Here I create an easy sample to have a test.
Data table:
X axis table:
X axis = UNION(VALUES('Table'[Type]),{"Total","ff+ts"})
Relationship:
Measure:
Measure =
VAR _Cal =
SUM ( 'Table'[Cal] )
VAR _Total =
CALCULATE ( SUM ( 'Table'[Cal] ), ALLSELECTED ( 'Table' ) )
VAR _ffandts =
CALCULATE (
SUM ( 'Table'[Cal] ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Type] IN { "ff", "ts" } )
)
RETURN
IF (
ISBLANK ( _Cal ),
SWITCH ( SELECTEDVALUE ( 'X axis'[Type] ), "Total", _Total, "ff+ts", _ffandts ),
_Cal
)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Guneet_B21 , Can you check if this can help
Power BI - Show Grand total row or Avg Grand total row in Visual: https://youtu.be/OSwRZ4GUhxc
Hi Amit,
this solves the issue for including the total (which i have already done in my BI),
i still need a solution to add 2 types and show them as a seperate bar as shown in my screenshot
Hi @Guneet_B21 ,
I think there should be a [Type] column and a [Cal] column in your table. We need to create a table with all data you need and add the column into X aixs.
Here I create an easy sample to have a test.
Data table:
X axis table:
X axis = UNION(VALUES('Table'[Type]),{"Total","ff+ts"})
Relationship:
Measure:
Measure =
VAR _Cal =
SUM ( 'Table'[Cal] )
VAR _Total =
CALCULATE ( SUM ( 'Table'[Cal] ), ALLSELECTED ( 'Table' ) )
VAR _ffandts =
CALCULATE (
SUM ( 'Table'[Cal] ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Type] IN { "ff", "ts" } )
)
RETURN
IF (
ISBLANK ( _Cal ),
SWITCH ( SELECTEDVALUE ( 'X axis'[Type] ), "Total", _Total, "ff+ts", _ffandts ),
_Cal
)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
there were some draw backs with this as well as i had seperate measures to execute the on and in this case it had to be done on columns.
I went and took a different route so i dont think i need to execute this now.
Thanks alot for your help, really appreciate it
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 22 | |
| 18 | |
| 18 | |
| 17 | |
| 13 |
| User | Count |
|---|---|
| 61 | |
| 53 | |
| 47 | |
| 40 | |
| 38 |