Forum Discussion

Keks's avatar
Keks
Frequent Visitor
2 years ago
Solved

Delete rows only if

Hi everybody,    Would like to find a way to flag rows when : - sequence is unique in the table  or - if sequence is not unique, then column description must be "Changed Qty'   Can someo...
  • Greg_Deckler's avatar
    2 years ago

    Keks Try:

    Measure = 
        VAR __Seq = MAX('Table'[Sequence])
        VAR __Result = 
            SWITCH(TRUE(),
                MAX('Table'[Description]) = "Changed Qty", 1,
                COUNTROWS(FILTER(ALL('Table'), [Sequence] = __Seq)) = 1, 1,
                0
            )
    RETURN
        __Result