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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors