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
dinoscool3
Helper I
Helper I

Show Percentage of Matrix Rows above X

I have data with registrations for the past two years, each registration is attached to a group and I've created a matrix with how many registrations each group has.

 

I want to see how many Groups have above 50 regsitrations. I've tried doing a mutlitude of functions but they all either find a blank, 1, or count every organization regardless of whether they are over 50.

 

One solution I tried was adding a measure column and used IF(count('Schools over 5 registrations'[email])>50,1,0) to see if I could get a work around. This correctly shows 1 for all groups over 50, but the "total" listed at the bottom is 1, and I can't seem to get SUM or SUMX to work with the measure.

 

I'm sure there's a very simple solution that I will facepalm myself for not thinking on, but could anyone assist me here?

Thank you!

2 ACCEPTED SOLUTIONS
v-eqin-msft
Community Support
Community Support

Hi @dinoscool3 ,

 

According to my understanding , you want to show how many organizations have more than 50 regsitrations,right?

You could try this:

 

CountFlag = IF( CALCULATE(COUNT('Table'[Email]),ALLEXCEPT('Table','Table'[Organization ]))>5,1,0)
CountAbove50 = IF(ISINSCOPE('Table'[Organization ]),[CountFlag], CALCULATE(DISTINCTCOUNT('Table'[Organization ]),FILTER('Table',[CountFlag]=1)))

 

The final output is shown below:

count measure in matrix.PNG

 

Best Regards,
Eyelyn Qin
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

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


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

View solution in original post

7 REPLIES 7
v-eqin-msft
Community Support
Community Support

Hi @dinoscool3 ,

 

According to my understanding , you want to show how many organizations have more than 50 regsitrations,right?

You could try this:

 

CountFlag = IF( CALCULATE(COUNT('Table'[Email]),ALLEXCEPT('Table','Table'[Organization ]))>5,1,0)
CountAbove50 = IF(ISINSCOPE('Table'[Organization ]),[CountFlag], CALCULATE(DISTINCTCOUNT('Table'[Organization ]),FILTER('Table',[CountFlag]=1)))

 

The final output is shown below:

count measure in matrix.PNG

 

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

Sorry for the late reply. This worked, almost. I assumed that the relative date filter I had in effect for the page would also work with the CountFlag function you listed, but it seems it didn't. I've tried adding in a dates in period function using my date table:

Schools over 50 = IF(CALCULATE(CALCULATE(COUNT('Schools over 5 registrations'[email]),ALLEXCEPT('Schools over 5 registrations','Schools over 5 registrations'[fmwmgkyrny groups.organization_name]))>50,DATESINPERIOD('Date',TODAY(),-90,DAY)),1,0)

 

but I get the following error: "DatesBetween and DatesInPeriod functions are only accepting date column reference as a first argument."

 

Is there any easier way to keep the date filter in tact for the Count Flag?

Ashish_Mathur
Super User
Super User

Hi,

Share some simple data, describe the question and show the expected result.


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

I'm having trouble posting so here's a screenshot of my reply.

dinoscool3_0-1621005876054.png

 

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


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

Hi @dinoscool3 ,

 

You can create a calculated column and assign 1 or 0 based on your criteria. Then create a measure to COUNT instead of SUM.

 

Hope this helps.

 

Thanks,

Dheeraj

Hi! I've tried this too, but  I run into the same problem. I've already caluclated the 1 or 0 on my matrix, but it won't let me count a column made from a measure.

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.