Row Filter Formula for Slice

Hello,
I Want to Have filter Formula to Select Selected Rows for Slices

Here is Formula what i am Using in Row Filter

OR([Key Column]=โ€œPrintingโ€, AND(OR([Status] =โ€œNโ€ ,[Status]=โ€œCโ€),Contains([Type],โ€œPtg.โ€),NOT(CONTAINS([Key Column],โ€œDirectโ€))))

Problem Here is that it Pick Up Double Row Having Same Ciretria
I want To Have Only First Matching Row

I Want to Add Filter for Col2 to Pick up Oldest Entry

is There is any Way to Achive This

Thanks

Solved Solved
0 3 198
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4

Try the following as your sliceโ€™s row filter expression, replacing table (1x) with the name of the table:

(
  [_ROWNUMBER]
  = MIN(
    SELECT(
      table[_ROWNUMBER],
      OR(
        ([Key Column] = โ€œPrintingโ€),
        AND(
          OR(
            ([Status] = โ€œNโ€),
            ([Status] = โ€œCโ€)
          ),
          CONTAINS(
            [Type],
            โ€œPtg.โ€
          ),
          NOT(
            CONTAINS(
              [Key Column],
              โ€œDirectโ€
            )
          )
        )
      )
    )
  )
)

View solution in original post

3 REPLIES 3

Does it work using ORDERBY() and TOP()?

Steve
Platinum 4
Platinum 4

Try the following as your sliceโ€™s row filter expression, replacing table (1x) with the name of the table:

(
  [_ROWNUMBER]
  = MIN(
    SELECT(
      table[_ROWNUMBER],
      OR(
        ([Key Column] = โ€œPrintingโ€),
        AND(
          OR(
            ([Status] = โ€œNโ€),
            ([Status] = โ€œCโ€)
          ),
          CONTAINS(
            [Type],
            โ€œPtg.โ€
          ),
          NOT(
            CONTAINS(
              [Key Column],
              โ€œDirectโ€
            )
          )
        )
      )
    )
  )
)

Thanks @Steve Your Formula Worked

Top Labels in this Space