Search filter with EnumList type

Hello guys,

I am creating a dashboard with a search filter. I created a virtual column "final balance" that has this expression: 

SUM (
SELECT (ESTBC [taxable invoice],
[Paid] = SEARCH [Paid]))

Where the [Paid] field from the SEARCH table is of type EnumList with two values โ€‹โ€‹("paid"; "unpaid") I would like to be able to select both "paid" and "unpaid" values. With this expression the filter only works if you select one of the two values.  


How can I modify the expression to filter the values โ€‹โ€‹that are both "paid" and "unpaid"?

TKS

Solved Solved
0 6 248
1 ACCEPTED SOLUTION

SUM(
  SELECT(
    ESTBC[taxable invoice],
    IN([Paid], SPLIT(("" & SEARCH[Paid]), " , "))
  )
)

View solution in original post

6 REPLIES 6

@SkrOYC Hi, can you explain me how can i use these expression in mine? I'll appreciate it

@SkrOYC @Steve  i made this correction but it doesn't works 

IN([Paid],SPLIT(SEARCH[Paid],",")))

I tried also with

[Paid]=IN(SEARCH[Paid], {"paid", "unpaid", "paid , unpaid"})

 

Could you help me? tks

SUM(
  SELECT(
    ESTBC[taxable invoice],
    IN([Paid], SPLIT(("" & SEARCH[Paid]), " , "))
  )
)

@Steve you are so precious!! Can you explain me the role of 

("" & 

in this expression?

Thanks!! ๐Ÿ˜„

("" & SEARCH[Paid]) is the same as CONCATENATE(SEARCH[Paid]). Both convert the list of values represented by SEARCH[Paid] into a single textual value of the same date. When a list is converted to text, the list elements are separated by the separator configured for the column (space-comma-space by default), ensuring a known separator value we can then use with SPLIT(). If you don't specifically convert the list to text, a different separator may be used to join the items, which confuses SPLIT().

Top Labels in this Space