Row filter condition with User Settings in slice

After hours or trying / researching I turn to you all for help with this apparently simple (yet - for me - elusive) Slice problem.

in the USER SETTINGS I have:
Track (text) which can be A, B, C etc
Activity (text) which can be Riffles, Archery, Rafting etc

in table SESSION_LIST I have:
session_uid (text) set UNIQUE()
track (text) as above
activity (text) as above
done (Yes/No)

I want to create a single View, using a Slice of SESSION_LIST that will EITHER
a. list matching rows by track - ie [_THISUSER].[Track] = [track]
OR
b. list matching rows activity - ie [_THISUSER].[Activity] = [activity]

Despite trying multiple way of creating the Slice, it is either empty or shows everything in SESSION_LIST.  I've tried SELECT, IF, SWITCH, virtual columns ... and now find myself so confused I don't know which way is up.

Guidance, suggestions, other solutions very welcome.

0 4 69
4 REPLIES 4

You may want to elaborate what are the column types [Track] and [Activity] in the User Settings and the  SESSION_LIST table? 

You have mentioned those as text type. However could you elaborate exact implementation. For example, are the options A, B, C as text string or enum or enumlist options available for the user?

gcor71_0-1690823836119.png    gcor71_1-1690823902560.png

The SESSION_LIST doesn't have a UX View - it's maintained through the source data only.

The USER SETTINGS are set with dependent drop-downs. 
The user selects Role first, defined as follows:

gcor71_2-1690824230909.png

Assuming the user has selected "Group Chaperone", they then proceed to set Group and Section, which returns their Track (the track must be selected, but there is only ever ONE Track shown).

gcor71_3-1690824383998.png  gcor71_4-1690824462642.png  gcor71_5-1690824508959.png

 

Hope this is clear for you.

Prompted by your questions, I took another look at my problem and realised I was mis-handling the Role column.  I was treating it like a text field, but it's a Yes/No field.  Once I accounted for this, I soon got the following Slicer filter to work:

IF(ISNOTBLANK([_THISUSER].[Role]),
IF(
[_THISUSER].[Role],
[track]=[_THISUSER].[Track],
[activity]=[_THISUSER].[Activity]
),
FALSE
)

Thank you for your nudge in the right direction.

Great. Good to know you got a solution. Thank you for the update. It will certainly help anyone going through the post thread in future.

Top Labels in this Space