Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

How to use a dynamic string variable

Hi guys,   Hope you can help me, i have this table:   the data is not always sorted so, i am looking for the operator name where the id is the highest: this the following i was able to get ...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Anonymous ,

    Please try to create a calculated column with below formula to replace the original measure:

    Column = 
    VAR _topclient =
        CALCULATE (
            MAX ( 'Well List'[Operator] ),
            FILTER (
                ALL ( 'Well List' ),
                'Well List'[WellID] = MAX ( 'Well List'[WellID] )
            )
        )
    RETURN
        IF (  'Well List'[Operator]  = _topclient, 1, 0 )

    Best Regards

    Rena