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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Schwurblini
Frequent Visitor

Filter between two values

Hi All

I am trying to count between two values, specifically i want to count all values between 5 and 10. I created the following measure:

 
More than 5 per month =
CALCULATE (
COUNT('Weekly Sales'[All Topnodes]),
FILTER('Weekly Sales', (COUNT('Weekly Sales'[All Topnodes]) >= 5 && 'Weekly Sales'[All Topnodes] < 10 )
))
 
The Topnodes are rows of a unique customer IDs which have an entry of that ID listed, every time this customer has a transaction. I want to know how many customers have made less than 5, between 5 and 10 and more than 10 transactions in a date slicer.
 Schwurblini_0-1671615009517.png

 

 
This Filter gives me no value back (For example 349997 should be returning 5), but when i only filter >= 5 or <10 i get all the values up to and from these settings.
Now i would only need the ones between obviously.
 
Where did i go wrong?
 
Thanks in advance for the help
1 ACCEPTED SOLUTION
Mahesh0016
Super User
Super User

More than 5 per month =
CALCULATE (
COUNT('Weekly Sales'[All Topnodes]),
FILTER('Weekly Sales', (COUNT('Weekly Sales'[All Topnodes]) >= 5 && COUNT('Weekly Sales'[All Topnodes]) < 10 )
))

@Schwurblini I hope this post is helps.

View solution in original post

3 REPLIES 3
Mahesh0016
Super User
Super User

More than 5 per month =
CALCULATE (
COUNT('Weekly Sales'[All Topnodes]),
FILTER('Weekly Sales', (COUNT('Weekly Sales'[All Topnodes]) >= 5 && COUNT('Weekly Sales'[All Topnodes]) < 10 )
))

@Schwurblini I hope this post is helps.

Amazing thanks, i knew there was something i overlooked, thanks for the fast response.

FreemanZ
Super User
Super User

hi  @Schwurblini 

 

try like:

 

5To10Count :=
COUNTROWS(
    FILTER(
        TableName, 
        TableName[AllTopNodes]>=5
            &&TableName[AllTopNodes]<=10
    )
)

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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