The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi everyone,
I have a published Power BI report that consists of a simple table with four columns: Product Type, Username, RLS Access, and Year. I would like to be able to hide the column "RLS Access" from certain people I will be sharing the report with, but still be able to have them to see the other three columns in the table. For all other users, I would like them to be able to see all four columns in the table.
I tried using Power BI's suggestion of Object Level Security for the column I want to hide, but that breaks the table visual. According to Power BI, "visualizations referencing a semantic model object with OLS configured display the same message as for a deleted or non-existing object.
Is there another way I can achieve my desired outcome of hiding certain columns in my final report table from specific users?
Solved! Go to Solution.
@Sunflower7500 Yes. The issues with OLS are why I created this article: Column Level Security - Microsoft Fabric Community
The best work around I devised was to unpivot the column that you're trying to hide with another column that you don't care about.
This will effectively gives you two copies of each row in your data set. Then, you can create a new dynamic column, which contains (i) for the "urestricted user group", the value in the column and (ii) for the "restricted user group", an empty string or a word like "[Redacted]". This dynamic column would be created using an if statement.
Then, all you have to do is assign two different row level security rules to your two user populations and select, based on the value of your dynamic column. This will change of the two parts of your data said they will see. Haven’t thought too much about it, but it is likely that this workaround could be extended or enhanced with little work.
It probably has been said but userprincipalname() doesn't work for calculated columns.
Again, you just have to make sure you pick your second parameter that you will use to pivot to be something you don't care about hiding.
@Sunflower7500 Yes. The issues with OLS are why I created this article: Column Level Security - Microsoft Fabric Community