Forum Discussion

aolan's avatar
aolan
Frequent Visitor
3 years ago
Solved

Count rows that are less than the current row's value

Hi,   I have a set of values from a calculated measure that represents the scores from a test - it counts the number of "Correct" marks. I basically want to count the rows of the values less than t...
  • Jihwan_Kim's avatar
    Jihwan_Kim
    3 years ago

    Hi,

    Thank you for your feedback.

    Could you please try the below?

     

    Expected count result measure: =
    VAR _a = [PRE_TotalNumeracy measure]
    RETURN
        CALCULATE (
            DISTINCTCOUNT ( 'TableName'[Name] ),
            FILTER ( ALL ( 'TableName'[Name] ), [PRE_TotalNumeracy measure] < _a )
        )