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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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