Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Percentile and Count

Hi all, 

I have a table consisting of a column dates and associated number of movements.

I've been able to calculate the 95th percentile, now i'm looking to count the number of dates which have movement greater than or equal to the 95th percentile per year.

 

I've created the 95th percentile as a new measure which works and tried then creating a new measure to count referencing the percentile column. 

 

Is anyone able to point me in the right direction please? 

 

Thanks,

 

Philip

 

  • Hello Anonymous 

    You will need a measure that calculates the total movement which I assume you have.  Give this a try.

    Dates over 95th percentile =
    CALCULATE (
        COUNTROWS (
            FILTER (
                DISTINCT ( 'YourTable'[Dates Field] ),
                [Total Movement] > [95th Percentile]
            )
        )
    )

1 Reply

  • Hello Anonymous 

    You will need a measure that calculates the total movement which I assume you have.  Give this a try.

    Dates over 95th percentile =
    CALCULATE (
        COUNTROWS (
            FILTER (
                DISTINCT ( 'YourTable'[Dates Field] ),
                [Total Movement] > [95th Percentile]
            )
        )
    )