Enumlist in filter not working

Hi All,

On the table โ€˜User_Profilesโ€™ I have a field Enumlist named โ€˜Fast Class Levelsโ€™ with text values โ€œFundamentalsโ€, โ€œIntermediateโ€ and โ€œAdvancedโ€ (see below)

On a slice from another table, I am trying to use this field as a filter criteria in the Row Filter Condition. It works fine when I hardcode it like so:
IN([Class Level], LIST("Fundamentals", "Intermediate"))

but it doesnโ€™t work when I place this one:
IN([Class Level], SPLIT(LOOKUP(CONTEXT(โ€œDeviceโ€), โ€œUser_Profilesโ€, โ€œDeviceโ€, โ€œFast Class Levelsโ€),","))

I tried to debug the issue by verifying exactly the content of SPLIT(LOOKUP(CONTEXT(โ€œDeviceโ€), โ€œUser_Profilesโ€, โ€œDeviceโ€, โ€œFast Class Levelsโ€),",") . I did that by having this expression in a virtual table field. I get the list composed of โ€œFundamentalsโ€, โ€œIntermediateโ€ but the result always show just records associated to โ€œFundamentalsโ€!

Thanks!

Solved Solved
0 7 468
1 ACCEPTED SOLUTION

Try
`

IN([Class Level], SELECT(User_Profiles[Fast Class Levels], CONTEXT(โ€œDeviceโ€)=[Device]))

`

View solution in original post

7 REPLIES 7

Steve
Platinum 4
Platinum 4

Split on space-comma-space:

" , "

not just comma:

","

Hi Steve,

I suspected it was around this as well, so I changed on purpose the separator expression on the field โ€˜Fast Class Levelsโ€™ from " , " to โ€œ,โ€ then updated the SPLIT TO parameter to โ€œ,โ€. Same problem.

Just to make sure I reversed it and it is the same behavior. It keeps showing me records associated to level โ€œFundamentalsโ€ only.

Thanks for your answer.

Hmmโ€ฆ

Spellingโ€™s all okay everywhere?

Yes spelling is correct. I just have 3 options โ€œFundamentalsโ€, โ€œIntermediateโ€ and โ€œAdvancedโ€. I tested it with different combination, either by picking each individual option (works fine) or by picking multiple options at one (the returned records only take into in account the first option).

Try
`

IN([Class Level], SELECT(User_Profiles[Fast Class Levels], CONTEXT(โ€œDeviceโ€)=[Device]))

`

It works! I did not think there would be a difference between SPLIT(LOOKUP()) and SELECT(). Thank you @Bellave_Jayaram

Youโ€™re welcome

Top Labels in this Space