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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
shrn
Frequent Visitor

Column with row total percentage of grand total

matrix2.PNG

 

Hi,

 

I have a matrix with "grades" (A-G) in the rows and "groups" (1-5) in the columns. The matrix shows the count of observations in my dataset in each grade-group combination. I also want to add a column with the row total percentage of the grand total (as can be seen in the print screen of the matrix). This I have achieved by creating a matrix where I have chosen show value as "percent of grand total" and placed it behind the first matrix. This would work fine, except when I press something in the top matrix, it becomes transluscent and shows the percentage matrix behind. Is there some way to just make a column with the percent of grand total, for only the row total, using create a new measure or new column? Kindly advise what formula I could use. I don't want the percentage for each column, in addition to the count.

 

Thanks!

 

 

4 REPLIES 4
Manishupreti
New Member

Guys, 

How to build a chart with stacked bar showing % of bar total - currently I can see in the value it only allows us to make stacked bar with % of grand total.  

quentin_vigne
Solution Sage
Solution Sage

Hi @shrn

 

Here is a measure that calculate the percentage of your row :

 

Mesure = DIVIDE(SUM(YourTable[Column]);CALCULATE(SUM(YourTable[Column]);ALLEXCEPT(YourTable;YourTable[Grades]));0)

- Quentin

Hi @quentin_vigne

 

Thanks a lot for your suggestion!

 

I tried this,however using count instead of sum, as I need the number of observations (and not the sum of the values):

 

Measure = DIVIDE(COUNT(YourTable[Column]);CALCULATE(COUNT(YourTable[Column]);ALLEXCEPT(YourTable;YourTable[Grades]));0)

 

Then I drag the measure into the values field in the visualizations tab. I get the table that is pasted below, with a column of the new measure, % of total, for each group (1-5). Also, the percentages are only for that row, and not for the whole matrix, so the total of the row = 100%.

 

matrix3.PNG

 

 However, I wanted just one column summarizing the % of each row of the total (as the one I illustrated in the picture in the previous post. Maybe this is not possible, which was why I was wondering.

 

-Shrey

@shrn,

Please check waltheed's workaround in the similar thread below.

https://community.powerbi.com/t5/Desktop/Table-Matrix-Just-Show-Percentage-of-Grant-Total-Column/td-...

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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