How to get rid of duplicated rows due to RLS by concatenating user IDs

I’m having issues with duplicated rows in order to enable Row Level Security. I have 2 rows having the exact same data but I want two QuickSight users to have access to, so my dataset will look something like this:

Country | Sales | UserID
USA | 120 | 1
USA | 120 | 2

And the RLS dataset will look like this:
Username | UserID
user1 | 1
user2 | 2

What I actually want to achieve is to concat the UserID in the dataset so I reduce all duplicates to one row, but then the RLS won’t read comma separate IDs in the original dataset.
For example the main dataset will look like this:

Country | Sales | UserID
USA | 120 | 1,2
And the RLS dataset will remain the same.

Now I know that I can have two different IDs concatenated in the RLS permissions set and it will actually read all rows having those two IDs in the original dataset. So why won’t the reverse work? i.e. having concatenated IDs in the main dataset?

Hi,

You can concate in QuickSight

You can handler the duplication during ETL or data load in QuickSight.

For RSL this Video will help you.

Regards,
Naveed Ali