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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
SriBhaskar
Regular Visitor

Matrix visual show two columns as Total and % total along with other columns

I have a matrix visual shows the country as rows, segments as column and the grandtotal. I need to add one more column beside total as total %. I dont need to add % for all the segments only as a column beside grandtotal. Below is the visual

SriBhaskar_0-1744665993317.png

I need to add % as a seperate column as a last column in the matrix. If I create a measure and add it, it is adding for all segments I dont need that to all the segments. I need both total and % columns at the end.

SriBhaskar_1-1744666201699.png

Can anyone help on this or any suggestion or workaround?
Thanks
Sri

 

1 ACCEPTED SOLUTION
v-dineshya
Community Support
Community Support

Hi @SriBhaskar ,

Thanks for reaching out to the Microsoft fabric community forum. 

 

when you add a measure to calculate the percentage, Power BI applies it to all columns (segments), not just to the total column. But with a little workaround using DAX, you can show a separate % Total column right next to the Total column without showing it for each segment.

Please follow the below steps:

Creating a measure that calculates the % of Total. Using a custom column layout (via field parameters or calculated groups with tabular editor if needed). Or the simpler way: manually arranging a second matrix to appear beside the first one (less dynamic but visually works).

By Using DAX (For a Separate % Column):

Step 1: Create the % Total Measure
% of Total =
DIVIDE(
[Sum of Units Sold],
CALCULATE([Sum of Units Sold], ALL('YourTable'[Country]))
)
Replace [Sum of Units Sold] and 'YourTable' with your actual measure/table names.

Step 2: Use This Measure in Matrix
Now to only show it in the Total column, you can try using a DAX trick to blank out values unless it's the total row (this works depending on layout):

% of Total Only in Total Column =
IF(
HASONEVALUE('Segment'[Segment]),
BLANK(),
[% of Total]
)
This tells Power BI: If you're inside a specific Segment (i.e., not the total column), then don't show anything. Only show value when it's not filtered by a Segment → i.e., the Grand Total column.

Step 3: Add This Measure to the Matrix
Now drag this measure into the Values field after the Sum of Units Sold.

Sample Output:

| Canada | Channel | Enterprise | ... | Total | % of Total |

 

If you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thanks and Regards

 

View solution in original post

5 REPLIES 5
v-dineshya
Community Support
Community Support

Hi @SriBhaskar ,

Thanks for reaching out to the Microsoft fabric community forum. 

 

when you add a measure to calculate the percentage, Power BI applies it to all columns (segments), not just to the total column. But with a little workaround using DAX, you can show a separate % Total column right next to the Total column without showing it for each segment.

Please follow the below steps:

Creating a measure that calculates the % of Total. Using a custom column layout (via field parameters or calculated groups with tabular editor if needed). Or the simpler way: manually arranging a second matrix to appear beside the first one (less dynamic but visually works).

By Using DAX (For a Separate % Column):

Step 1: Create the % Total Measure
% of Total =
DIVIDE(
[Sum of Units Sold],
CALCULATE([Sum of Units Sold], ALL('YourTable'[Country]))
)
Replace [Sum of Units Sold] and 'YourTable' with your actual measure/table names.

Step 2: Use This Measure in Matrix
Now to only show it in the Total column, you can try using a DAX trick to blank out values unless it's the total row (this works depending on layout):

% of Total Only in Total Column =
IF(
HASONEVALUE('Segment'[Segment]),
BLANK(),
[% of Total]
)
This tells Power BI: If you're inside a specific Segment (i.e., not the total column), then don't show anything. Only show value when it's not filtered by a Segment → i.e., the Grand Total column.

Step 3: Add This Measure to the Matrix
Now drag this measure into the Values field after the Sum of Units Sold.

Sample Output:

| Canada | Channel | Enterprise | ... | Total | % of Total |

 

If you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thanks and Regards

 

Hi @SriBhaskar ,

If you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thanks and Regards

Hi @SriBhaskar ,

If you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thanks and Regards

Hi @SriBhaskar ,

If you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thanks and Regards

BeaBF
Super User
Super User

@SriBhaskar Hi! 

Try with calculate a separated table as:

Segment Plus =
UNION (
VALUES('Segments'[Segment]),
ROW("Segment", "Total %")
)

 

Use SegmentPlus as your column in the matrix.

 

Now create a measure like:

Matrix Value =
SWITCH (
SELECTEDVALUE('Segment Plus'[Segment]),
"Total %",
DIVIDE(
[Sum of Units Sold],
CALCULATE([Sum of Units Sold], ALLSELECTED('YourTable'[Country]))
),
[Sum of Units Sold]
)

 

Use this measure as Values in the matrix.

 

Your matrix will show:

  • Segments as usual (Channel Partners, Enterprise, etc.)

  • Grand Total (auto-calculated by matrix)

  • One extra column at the end called "Total %" showing each country’s % of the overall total.

BBF


Did I answer your question? Mark my post as a solution!
👍 Kudos are appreciated
🔥 Proud to be a Super User!
Community News image 1920X1080.png

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.