Enumlist Dashbaord Filter - Multiple Selection

Hey there! Trying to make a slice for a dashboard filter.
The column in the filter table is an Enum list. Trying to search a selection of user selected genres against a table of bands whoโ€™s [Genre] Column contains the previously mentioned Filter Table[Genres]

My slice expression is:
CONTAINS([Genre],Any(Filter Table[Genre]))

It works, but wonโ€™t register more than one selection? it ignores everything after the comma/ delimiterโ€ฆ

Is there a function similar to ANY() which allows multiple selection, as ANY() only allows ONE selection from a list of many? Or a means for the CONTAINS() Function to consider all of the selected Enumlist options? I need a Selection of Many from a Selection of One OR Many if possibleโ€ฆ

I tried turning the string into a list with:
CONTAINS([Genre],SPLIT(Filter Table[Genre],","))

But that did not work eitherโ€ฆ I also searched through the forum for a similar issue to no availโ€ฆ

Would anyone have any suggestions?

Solved Solved
0 24 2,689
1 ACCEPTED SOLUTION

Ok, so that is probably where weโ€™re stuck.

Based off of the screenshots, EnumList currently wonโ€™t work, because (and Iโ€™m guessing here) that Iโ€™m willing to bet that since there isnโ€™t one standard delimiter to work with, only certain bands have their genres breaking into their individual values and other times where the genre is being stored as one whole string. This was one of the problems you were going to run into in that I mentioned earlier.

Now, that isnโ€™t to say that EnumList isnโ€™t going to be the plan though. It just needs to be standardized on both sides in order to work. However, as you have mentioned, itโ€™s going to be a lot of work to standardize all of it.

So here is what I would do.
First, clone the app as it is right now as Version 2. This will where you can work on the hard part. More on that later.

On version 1, switch the bandโ€™s Genre to Text. From what I see, a majority of the bands used either commas or slashes to delineate. Then change the expression to
OR(CONTAINS([Genre], INDEX(Filter Table[Genre], 1)), CONTAINS([Genre], INDEX(Filter Table[Genre], 2)), CONTAINS([Genre], INDEX(Filter Table[Genre], 3)), {.....})
The {โ€ฆ} part you can delete or use that space to keep going with the expression. I would choose a maximum number of filters (maybe 3 or 5 sounds reasonable), and then come up with a message somewhere to users that only the first X selections will actually be filtered. Let me know if that works temporarily.

Version 2:
A new table consisting of just genre options. 1 genre per line. And I would stick to the most easily recognizable ones and not ones where people go โ€œwtf does this even mean?โ€ Then both genre columns can be EnumList of base Ref pointing to the new table. Both of these Valid_Ifs would also be just [Genre]. That will ensure both the filter list and the bandโ€™s listed genreโ€™s will be from the same data. By default, AppSheet wonโ€™t do anything with it until you attempt to edit the band, at which point it will yell at your about the genreโ€™s not being valid and wonโ€™t let you save it. Then your expression would be

OR(IN(INDEX(Filter Table[Genre], 1), [Genre]), IN(INDEX(Filter Table[Genre], 2), [Genre]), IN(INDEX(Filter Table[Genre], 3), [Genre]), {.....})

View solution in original post

24 REPLIES 24
Top Labels in this Space