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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
siddgupta
New Member

Calculating proportion based on selection

Hi,

 

I am trying to add a column to a matrix visual that looks to caputure the number of times someone is reported as "top 2 box" or "don't know" and then divide that by the total number of people that fit under that criteria based on fitlers like "audience" ,"gefilter.PNGo"

, "Company", "Wave"  as opposed to the total row count 

 

top 2 box is classified by a new column that has the following logic: Metric Value = IF(OR(' Merge'[Score] = "7",  Merge'[Score] = "6"), "Top 2 Box", IF(' Merge'[Score] = "99", "Don't Know"))

 

Here's the information for the matrix:

Rows: attributes

Columns: Metric Value (coming from the column mentioned above)

Values:  count of metric values

Matrix.PNG

 

 

So just to clarify, in the above matrix add an additional column that takes that 124 value and divides by the total sample for that based on the filters (not the total column, or the full sample size of respondents)

 

 

 

Amazon Merge Table columns

Capture.PNG

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

 

Try this measure

 

=COUNTROWS(Data)/CALCULATE(COUNTROWS(Data),ALLEXCEPT(Data,Data[Metric Value]))


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

Hi Ashish,

 

 

That Ddd not give me the anticipated result. Below I have included a screenshot of the full dashboard with filters - hiding the company filter. The current numbers in the matrix are the values based on the audience filtered to 'elite' and the Geo filtered to 'US'. As previously mentioned, I created a criteria for Don't Know & Top 2 Box. For example, in this scenario there should be 250 people that statisfy that audience, company, geo, and wave filter. I need to find the percentages of these out of that 250 that fit the criteria. The value for top 2 box in the 5th row of my matrix should be 145/250 = 58%. I hope that makes more sense?

 

Rows: Attribute

Column: Metric Value

Values: Count of Metric Valus

 

Dashboard with Filters on the Left and up top and values displayed by Metric ValueDashboard with Filters on the Left and up top and values displayed by Metric Value

Hi,

 

Share the link from where i can download your PBI file.


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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.