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
Anonymous
Not applicable

How to calculate row percentage

I have tried a few different formulas, but I am not able to just get the row percentage for each row. The end goal is to have the two rows displayed in a pie chart. The problem I am running into is that the percentage that it gives me is a total of the two rows, instead of dividing one row by the other. I would appreciate any help!

Thank you!

 

Attached are the two rows that I would like to get percentages for.

Capture.JPG

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

Create measures

Measure = 
CALCULATE(SUM(Table1[Column1]),FILTER(ALL(Table1),[VDC Goal]="Current Employees"))

Measure 2 = 
CALCULATE(SUM(Table1[Column1]),FILTER(ALL(Table1),[VDC Goal]="Employee Hire Goal"))

Measure 3 =
IF(MAX(Table1[VDC Goal])="Employee Hire Goal",1,[Measure]/[Measure 2])

10.png11.png

 

Best Regards

Maggie

 

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

View solution in original post

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

Create measures

Measure = 
CALCULATE(SUM(Table1[Column1]),FILTER(ALL(Table1),[VDC Goal]="Current Employees"))

Measure 2 = 
CALCULATE(SUM(Table1[Column1]),FILTER(ALL(Table1),[VDC Goal]="Employee Hire Goal"))

Measure 3 =
IF(MAX(Table1[VDC Goal])="Employee Hire Goal",1,[Measure]/[Measure 2])

10.png11.png

 

Best Regards

Maggie

 

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

Greg_Deckler
Super User
Super User

In the Fields area, click the little drop down next to the column and choose "Show As | Percentage of row" or Percent of total


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

I only have "Percentage of Grand Total" on the drop down menu.

 

Thank you for the reply!

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.