Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Rewrite Measure

I have the below measure.   Employee 5+ Jobs = VAR newtable = ADDCOLUMNS ( SUMMARIZE ( Employees, Employees[Employee Name] ), "@jobcount", CALCULATE ( COUNTROWS ( VALUES ( 'Employees'[Job] ) ...
  • v-yanjiang-msft's avatar
    v-yanjiang-msft
    4 years ago

    Hi Anonymous ,

    Did you mean there's blank value in Job column like this?

    If this is the case, you can modify the formula of Rank like this:

    Rank =
    IF (
        'Table'[Job] = BLANK (),
        BLANK (),
        RANKX (
            FILTER (
                'Table',
                'Table'[Date] = EARLIER ( 'Table'[Date] )
                    && 'Table'[Employee Name] = EARLIER ( 'Table'[Employee Name] )
                    && 'Table'[Job] <> BLANK ()
            ),
            'Table'[Job],
            ,
            ASC,
            DENSE
        )
    )
    

    Then it can get the correct rank.

    Best Regards,
    Community Support Team _ kalyj

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.