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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.