Forum Discussion
Help required to implement security...
For one of my security requirement. I will have following table as input and thinking of following table as output but dont think that is the optimized way of doing it. For lesser number of records it looks fine but when the volume of the record is too high this will not workout.
If you have any sample application which does the same. Please share the same...
Please let me know the optimised way of implementing this.
Input:
Output:
Hi pbiforum123
Please see follow the steps in the video.
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
LinkedInBest Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
LinkedIn
21 Replies
- MariuszCommunity Champion
Hi pbiforum123
Not sure if I understand the question but, just create the "output" table and add it to your model for RLS
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
LinkedIn- pbiforum123Post Patron
As mentioned in my post descripiton for small level of dataset it is fine but when the volume is huge then this is not the right approach. I just shared the output table for your reference.
- MariuszCommunity Champion
Hi pbiforum123
Please see the attached file with a Power Query Solution included.
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
LinkedIn- pbiforum123Post Patron
Mariusz Please attach the file again to take a look
- MariuszCommunity Champion
Hi pbiforum123
No idea why you can not open the file as just checked and its working fine on my end.
Instead, please see the below M script, you can paste it into the advance editor of a blank query and investigate the steps.
Let me know if you need any assistance.
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSkxKdkjPTczM0UvOz1XSUUpUitWJVkpJTUMRTQKLVlRWoYgqxcYCAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [user = _t, group = _t]), #"Renamed Columns" = Table.RenameColumns(Source,{{"group", "_group"}}), #"Replaced Value" = Table.ReplaceValue(#"Renamed Columns","",null,Replacer.ReplaceValue,{"_group"}), groups = List.RemoveNulls( #"Replaced Value"[_group] ), #"Added Custom" = Table.AddColumn(#"Replaced Value", "group", each if [_group] = null then groups else { [_group] }), #"Removed Other Columns" = Table.SelectColumns(#"Added Custom",{"user", "group"}), #"Expanded group" = Table.ExpandListColumn(#"Removed Other Columns", "group"), #"Changed Type" = Table.TransformColumnTypes(#"Expanded group",{{"group", type text}}) in #"Changed Type"Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
LinkedIn
- pbiforum123Post Patron
I am unable to open the attached file. I am getting following error. Please attach it again...
- AnonymousNot applicable
Hi pbiforum123 ,
Not sure if i understand the question, but you can implement dynamic RLS (using USERNAME() DAX). By doing so, when a user views the report, he will be able to see his respective group only.
Thanks!
- pbiforum123Post Patron
Thanks for responding! I know how to implement security. So my question is not about that.
If you see the above post, I will receive the above table from the client to give access to certain groups. If the group name is blank, then it means that they should access to all groups. I know to get this work I need to have dataset as shown in the output table but as you know this is not the optimized way to implement this as when the volume of data increases creating one one record for each group is tedious job.
So my question here is, is there is any better/optimised way to implement this.
Hope it is understandable now. Please let me know if you have any questions.