Forum Discussion
Simple Count measure
- 1 year ago
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")
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?