Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

DAX query

I have a column of scores and want to get the number of scores greater than score X and the %  of scores greater than score x

  • Anonymous Maybe:

    Measure =
      VAR __X = 10
      VAR __Result = COUNTROWS(FILTER('Table',[Value] > __X)
    RETURN
      __Result
    
    
    Measure 2 = 
      VAR __Count = COUNTROWS('Table')
      VAR __Result = DIVIDE([Measure], __Count)
    RETURN
      __Result

1 Reply

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Anonymous Maybe:

    Measure =
      VAR __X = 10
      VAR __Result = COUNTROWS(FILTER('Table',[Value] > __X)
    RETURN
      __Result
    
    
    Measure 2 = 
      VAR __Count = COUNTROWS('Table')
      VAR __Result = DIVIDE([Measure], __Count)
    RETURN
      __Result