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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
gill_thornton
Helper I
Helper I

Meassure with Filter

Hi

I work in a high school & am trying to create a measure that counts the number of students in a table with 2+ or 3+ exclusions.  I have a calendar table, which contains terms & dates.  I need to be able to add a slicer on my current visual which includes number of exclusions & number of students with exclusions.  My table is a list of student identifier, type of exlcusion (permanent or suspension) start date and end date number of days excluded.  I have tried using the following but it is just returning blanks:

No Students 2+ = CALCULATE(DISTINCTCOUNT(Exclusions[UPN]),
FILTER(
ALL(Exclusions),
Exclusions[Start date]>=MIN('Calendar'[Date])&&
Exclusions[Start date]<=MAX('Calendar'[Date])),
FILTER(ALLSELECTED(Exclusions),
CALCULATE(COUNTROWS(Exclusions))>=2))
 
Any help would be appreciated.

 

1 ACCEPTED SOLUTION

You can do that in a graphical way (putting the UPN and any column count in a table or matrix)

lbendlin_0-1687194063045.png

 

or you can have a card visual with a measure behind it

 

lbendlin_1-1687194197244.png

Both solutions will be impacted by any date range filters you may want to apply.

 

View solution in original post

4 REPLIES 4
gill_thornton
Helper I
Helper I

Sample Data 

 

I would expect to see 4 students with 2+ suspensions in this sample file.

 

Thank you for your help with this.

You can do that in a graphical way (putting the UPN and any column count in a table or matrix)

lbendlin_0-1687194063045.png

 

or you can have a card visual with a measure behind it

 

lbendlin_1-1687194197244.png

Both solutions will be impacted by any date range filters you may want to apply.

 

Thank you.  This worked perfectly.

lbendlin
Super User
Super User

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors