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
RichOB
Post Partisan
Post Partisan

Simple Count measure

Hi, I have 2 dog kennels with 10 spaces in Manchester and 3 in Edinburgh. What measure would tell me that any Location with over 6 kennels is classed as a "Large Kennel", and anything under 6 is classed as a "Small Kennel" please? Thanks!

 

LocationKennels
ManchesterM1
ManchesterM2
ManchesterM3
ManchesterM4
ManchesterM5
ManchesterM6
ManchesterM7
ManchesterM8
ManchesterM9
ManchesterM10
EdinburghE1
EdinburghE2
EdinburghE3
1 ACCEPTED SOLUTION

Hi @RichOB ,

For that case Just assume >= to include 6 kernels, please see the updated DAX

Kennel_Size_Measure = 
VAR KennelCount = COUNT('Table'[Kennels])
RETURN
IF(KennelCount >= 6, "Large Kennel", "Small Kennel")

 

View solution in original post

5 REPLIES 5
Bibiano_Geraldo
Super User
Super User

Hi @RichOB ,

Use this measure to achieve your goal:

Kennel_Size_Measure = 
VAR KennelCount = COUNT('Table'[Kennels])
RETURN
IF(KennelCount > 6, "Large Kennel", "Small Kennel")

 

Your Output will look like this:

Bibiano_Geraldo_0-1738316215891.png

 

Thanks for this. It has given the output I need, but in my real-life scenario, when a location has exactly 6 kennels it shows as blank. Do you know why this is, please?

Hi @RichOB ,

For that case Just assume >= to include 6 kernels, please see the updated DAX

Kennel_Size_Measure = 
VAR KennelCount = COUNT('Table'[Kennels])
RETURN
IF(KennelCount >= 6, "Large Kennel", "Small Kennel")

 

DataNinja777
Super User
Super User

Hi @RichOB ,

 

You can create a DAX measure in Power BI to classify each location as either a "Large Kennel" or a "Small Kennel" based on the total number of kennels in each location. The measure counts the number of kennels per location and applies a condition where locations with more than 6 kennels are categorized as "Large Kennel" while those with 6 or fewer are labeled as "Small Kennel."

Kennel Size Classification = 
VAR KennelCount = COUNT('Table'[Kennels])
RETURN 
    IF(KennelCount > 6, "Large Kennel", "Small Kennel")

For example, in this dataset, Manchester has 10 kennels, so it will be classified as a "Large Kennel," while Edinburgh, with only 3 kennels, will be classified as a "Small Kennel." This logic ensures that locations are dynamically categorized based on the number of kennels they contain.

 

Best regards,

Thanks for this. It has given the output I need, but in my real-life scenario, when a location has 6 kennels it shows as blank. Do you know why this is, please?

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.