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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

Percentage derived from values stored in 1 column

Hola Power Bi Gurus

 

I currently have a Matrix thats pulling 3 sources 

-PHASES

-STATUS

-COUNT

Tmurphy_1-1674058539374.png

 

In the Matrix the "STATUS" splits the 2 statues "Installed" & "Not Installed"

 

I am having an issue of taking the "Installed" count and cacluating a percentage based off the Total. So in theory 

PH0 would have a percentage of 9% (Based off of 24/65=.0905)

I added a text box off to the side of matrix for the result i am looking for. 

 

Any Help is much apperciated!

 

 

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

Hi , @Anonymous 

According to your needs provided and your current screenshot, after my testing and research, if you want to achieve the current demand situation, you may want to slightly adjust the schema of the field placement of your matrix, you can refer to my scheme, my test data is created according to the screenshot provided by you:

Installed =SUMX(FILTER('Table','Table'[STATUS]="Installed"),'Table'[COUNT])
Not Installed =SUMX(FILTER('Table','Table'[STATUS]="Not Installed"),'Table'[COUNT])
Percentage Complete =var _installed=SUMX(FILTER(ALLSELECTED('Table'),'Table'[PHASE]=MAX('Table'[PHASE])&&'Table'[STATUS]="Installed"),'Table'[COUNT])var _NotInstalled=SUMX(FILTER(ALLSELECTED('Table'),'Table'[PHASE]=MAX('Table'[PHASE])&&'Table'[STATUS]="Not Installed"),'Table'[COUNT])var _All=SUMX(FILTER(ALLSELECTED('Table'),'Table'[PHASE]=MAX('Table'[PHASE])),'Table'[COUNT])returnDIVIDE(_installed,_All)

 

You can go to the matrix, remove the fields from the "Column" bucket, and then put three newly created measures in the "Value" bucket, in which case your needs can be perfectly realized:

vyueyunzhmsft_0-1674097848668.png

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

4 REPLIES 4
v-yueyunzh-msft
Community Support
Community Support

Hi , @Anonymous 

According to your needs provided and your current screenshot, after my testing and research, if you want to achieve the current demand situation, you may want to slightly adjust the schema of the field placement of your matrix, you can refer to my scheme, my test data is created according to the screenshot provided by you:

Installed =SUMX(FILTER('Table','Table'[STATUS]="Installed"),'Table'[COUNT])
Not Installed =SUMX(FILTER('Table','Table'[STATUS]="Not Installed"),'Table'[COUNT])
Percentage Complete =var _installed=SUMX(FILTER(ALLSELECTED('Table'),'Table'[PHASE]=MAX('Table'[PHASE])&&'Table'[STATUS]="Installed"),'Table'[COUNT])var _NotInstalled=SUMX(FILTER(ALLSELECTED('Table'),'Table'[PHASE]=MAX('Table'[PHASE])&&'Table'[STATUS]="Not Installed"),'Table'[COUNT])var _All=SUMX(FILTER(ALLSELECTED('Table'),'Table'[PHASE]=MAX('Table'[PHASE])),'Table'[COUNT])returnDIVIDE(_installed,_All)

 

You can go to the matrix, remove the fields from the "Column" bucket, and then put three newly created measures in the "Value" bucket, in which case your needs can be perfectly realized:

vyueyunzhmsft_0-1674097848668.png

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Anonymous
Not applicable

THANK YOU SO MUCH! This fixed my issue. MUCH APPRECIATED. 

amitchandak
Super User
Super User

@Anonymous ,

You can measure like

Assume you have count measure

 

divide([count], calculate([count], removefilters(Table[Status])) )

 

Percent of Total and Percent of SubTotal https://www.youtube.com/watch?v=6jTildcV2ho
https://www.youtube.com/watch?v=cN8AO3_vmlY&t=24270s

 

You can use isinscope to change grand total

 

if(isinscope(Table[Status]), [Count], divide([count], calculate([count], removefilters(Table[Status])) ) )

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Apperciate the response but this did not work for me. I am sure its something i did as i am still learning how to use the software. 

 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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