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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
MrNoob
Helper II
Helper II

Percent of filtered Total

This may be hard to explain but I will give it a go.  I need percent of a column, that is filter down to a group within that column.  IE table[Product], but filtered down to APPLES.  When the product column contains APPLES, ORANGES, and PEARS.  

 

Then, of course, divide Total Apples /  all(table[Prodcut] = "APPLES"  (this does not work but I hope it illustrates what I am trying to accomplish)

 

The all statement is meant to be used with the various slicers.

11 REPLIES 11
MrNoob
Helper II
Helper II

Sanitized data

 

This is the top 10 of the data set, I want to divide the numbers by the bottom grand total.  

 

 

Capture.PNG

Hi,

 

That is Top 11 not top 10.  Try this

 

=[Revenue]/SUMX(TOPN(10,ALL(Channel),[revenue]),[revenue])

 

If this does not work, then share a sample workbook.

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

No:( ,  The easiest work around, because I had built this into Powerpivot, is to just use excel on the side.  

Hi,

 

I do not understand your response.  Please clarify.  Did my suggested formnula solve the problem?  If not, please be specific.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

No, the formula did not work.  The first category became 100% and everything else was weighted off of 1002.   

Hi @MrNoob,

 

You need to clarify all filter context and display data model for we´re going to help you. Can you do it?

 

Regards,

My apologies,

 

The filter context is as follows

 

hol_agency_namehol_clientele

MTD UA REV

Company XBusiness1002
Company YBusiness537

 

The MTD UA REV is already filtered down by month and department (UA being the department).  I am trying to find what percentage of MTD UA REV came from company X,  So in this case  1002 (company X) / (2879) Grand total of MTD UA REV= 34%

 

 

I also want to thank you guys for your help.  This site provides me with lots of insight, and I am grateful for your assistance.  This is a great learning experience for sure. 🙂  

Hi,

 

It will be nice if you can share the link from where your file can be downloaded.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Try ALLSELECTED function. I believe that it works fine for your purpose.

GabrielSantos
Resolver I
Resolver I

 

To clarify, are you looking for the % against the grand total of all categories, such as

 

Product | Quantity

Apples      20

Oranges   30

Pears        50

 

Apples are 20% of total, oranges 30% of total, pears 50% of total - and the measure returns the count against the count of ALL products regardless of what is on the slicer?

I wish that was the case.  

 

I want to take the total of apples sold, and then find the percent each store had sold.  

 

IE

 

Product | Quantity                                

Apples      20

Oranges   30

Pears        50

 

   Store | Name

North 

South

 

North sold: 15/20 = 75%

South sold: 5/20 = 25%

 

 

I think that may be a better explanation 

 

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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