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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
erezb
Frequent Visitor

Matix - show percentage

Hi

 

I'm new to power Bi, and have just tested the matrix visualization.

Can someone guide me how can I present percent of each cell (besides its absoulte value).

I have created a measure for Percent that shows for each cell its relative percent from the total row sum.

However since I have a slicer than when while filtering the data I still see the same percent as if I didn't filter the data.

 

I have a table holding consumption of 4 different medicines.

 

This is the measure I used for the percent of each cell.

Divide(Sum(MedsTable[Customers]), Calculate(Sum(MedsTable[customers]),All(MedsTable[TypeMed])))

 

TypeMed is also the slicer input (4 optional values - the meds types).

 

This is the matrix Pattern.

 

                              Customers

 

               MedType1     Medtype2  Medtype3       Medtype4          Total

hospA      50  (0.25)      10 (0.05)         100 (0.5)           40 (0.2)           200

hospB      ...                   ...                 ...                ...

HospC     ...                   

.....

 

When choose from the slicer TypeMed3 and TypeMed4, the relative columns  1 and 2  dissapear as expected but TypeMed3's and TypeMed4's percentage shown don't change accordingly. 

I want the "new total" in this situation be 100 + 40 = 140 resulting from Typemed3 and 4. and the percentage be 100/140 and

40/140 respectively (besides the absoulte values 100 and 40 which are shown correctly).

 

Thanks in advance

Erez

 

 

 

2 ACCEPTED SOLUTIONS
Sean
Community Champion
Community Champion

@erezb

1) try changing ALL to ALLSELECTED

 

2) the other thing you can try is create a Measure that gives you the values => Sum(MedsTable[Customers])

 

drag this Measure twice to the Values area - click on the little triangle next to the name of the second

 

Quick Calc - Show Values as - % of Row Total (that will also adjust to the slicers)

 

Good Luck! Smiley Happy

View solution in original post

Hi @erezb,

As the @Sean said,  there is currently no functionality to rename x,y axis and measure in visual. You can vote the idea hereSmiley Happy.

 

Thanks,
Angelia

View solution in original post

5 REPLIES 5
Sean
Community Champion
Community Champion

@erezb

1) try changing ALL to ALLSELECTED

 

2) the other thing you can try is create a Measure that gives you the values => Sum(MedsTable[Customers])

 

drag this Measure twice to the Values area - click on the little triangle next to the name of the second

 

Quick Calc - Show Values as - % of Row Total (that will also adjust to the slicers)

 

Good Luck! Smiley Happy

erezb
Frequent Visitor

Thanks a lot SeanSmiley Happy. Both solution worked.

The only thing left considering you second option is  that when I calculate the measure and call it for instance "Cntids"' the percentage column's header becomes "%RT Cntis". How can I change this to a different name - say just "percent"?

I tried the right mouce click and looked at the formatting area but could not find it.

 

 

 

 

Hi @erezb,

As the @Sean said,  there is currently no functionality to rename x,y axis and measure in visual. You can vote the idea hereSmiley Happy.

 

Thanks,
Angelia

Sean
Community Champion
Community Champion

@erezb

In Excel even if you use the built-in calculations for Show Values As

you can still rename or assign a Custom Name

 

% Of Options.png

 

in PBI unfortunately this is not possible (at least no yet)!

If you want a custom name you have to write the Measure that performs the corresponding calculation!

 

If they add all calculations built-in Excel to PBI they will just have to let us Customize the names as well!

I'm pretty sure the more Quick Calcs they add the more people will ask for the ability to assign a Custom Name! Smiley Happy

EDIT: Note that this is not really renaming as the Source Name remains the same.

Once you have your measures sorted you can combine them into a single cell using something like this
Measure1 = CALCUATE( <SOME calculation=""> )
Measure2 = CALCUATE( <SOME calculation=""> )
finally this is what you can add to the VALUES area of your matrix
&nbsp;
Matrix Measure = [Measure1] & " (" &[Measure2] &")"
which will allow you to have both sets of data in the same cell

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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