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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Employee
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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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