I've a table product_usage with product_name and used_date columns. And I also have RLS implemented. i.e. a user will only be able to see the products he/she is entitled to.
And the report has a few KPIs (bar charts, pie charts, table etc.) and I have a slicer (dropdown and single select) with values from product_name column. Everything is good till here. Now the requirement is to have only one product selected by default and the selected product should be based on the latest of used_date column.
I tried implementing similar to how the 'Current Month default slicer selection' is implemented. It works fine without RLS but when RLS is on, i.e. when I view as a user with a specific role, it doesn't work. For the default selection, I'm okay to display it as 'Latest Product' like 'Current Month'.
Any help would be appreciated. Let me know if you need any more details.