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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
hellyLoft
Frequent Visitor

Countrows les then and more than a value

Hello,

I am trying to create a measure which will count the number of rows in a column that have a number of less than 36 and more than 36 (but not any that are 36).

 

MidYearAdm = CALCULATE(COUNTROWS('Pupil[week number]),Pupil[week number]IN{"<36",">36"})

Would anyone know what is the best way to do this please?

Thank you, Helen

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@hellyLoft , Try like

MidYearAdm = CALCULATE(COUNTROWS('Pupil'[week number]),filter(Pupil,Pupil[week number] <36 || Pupil[week number] >36 ))

View solution in original post

2 REPLIES 2
Fowmy
Super User
Super User

@hellyLoft 

MidYearAdm = CALCULATE(COUNTROWS('Pupil[week number]),Pupil[week number] <> 36)



________________________

Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon on the right if you like this reply 🙂

YouTube, LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

amitchandak
Super User
Super User

@hellyLoft , Try like

MidYearAdm = CALCULATE(COUNTROWS('Pupil'[week number]),filter(Pupil,Pupil[week number] <36 || Pupil[week number] >36 ))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.