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
android1
Post Patron
Post Patron

Counting values in a Matrix table greater than x

Hi,

 

I have a Matrix table with the measure Total Carers = DISTINCTCOUNT(OTIF[Carers]) which gives me a total for e.g 10.

I need to calculate how many of these total values are between x & y.

 

For example. I need to calculate how many total values are between 8 & 12.

 

Sample Data.png

 

 

1 REPLY 1
v-haibl-msft
Microsoft Employee
Microsoft Employee

@android1

 

I tested with below sample table. We can create a new table which only includes two columns of Clients and Carers Count. Then create a measure to get the expected result.

Counting values in a Matrix table greater than x_1.jpg

 

Table = 
SUMMARIZECOLUMNS ( OTIF[Clients], "Carers Count", [Total Carers] )

Counting values in a Matrix table greater than x_2.jpg

Total_Values_Between_8_12 = 
CALCULATE (
    COUNTROWS ( 'Table' ),
    FILTER ( 'Table', 'Table'[Carers Count] >= 8 && 'Table'[Carers Count] <= 10 )
)

Counting values in a Matrix table greater than x_3.jpg

 

Best Regards,

Herbert

 

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.