Forum Discussion

android1's avatar
android1
Icon for Post Patron rankPost Patron
10 years ago

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.

 

 

 

1 Reply

  • v-haibl-msft's avatar
    v-haibl-msft
    Icon for Microsoft Employee rankMicrosoft 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.

     

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

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

     

    Best Regards,

    Herbert