Forum Discussion

aaronhowe's avatar
aaronhowe
Frequent Visitor
2 years ago
Solved

Apply a measure conditionally when data category changes

I'm stuck again 😫   Previously I was asking about ranking values through DAX (see this thread) and have achieved what I wanted there, however I'm struggling with the complexity of the underlying d...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi aaronhowe ,

    The Table data is shown below:

    Please follow these steps:
    1. Use the following DAX expression to create a column

     

    Rank = 
    VAR _a = [Name]
    VAR _b = [MonthYear]
    VAR _c = [Grade]
    RETURN COUNTROWS(FILTER('Table','Table'[Name] = _a && 'Table'[MonthYear] = _b && 'Table'[Grade] <= _c))

     

    2.Final output