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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.