Forum Discussion
Help required to implement security...
- 6 years ago
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
Mariusz Thanks a lot for this. Currently facing some network issue. I will keep you posted as soon as it is fixed.
Mariusz I followed your video and it worked like a magic! Thanks a lot..
But I dont want to stop there. I would like to understand step by step. So that if I come across any such requirement I can manage it myself.
I have couple of more questions,
1. Your solution works perfectly if all the groups exists in the security table. Like in your example, we have group called as "a" and "b" only. What if there is a group called "c" in the FACT table but that has not been given access to any of the users? So in your sample access to "c" will not given to so and so users. So can you please provide me one more sample if possible which can handle these sorts of scenario?
2. As I mentioned in the initial post getting the output with the desired data set will resolve this issue but what if the volume of the records is huge. This will definitely add number of records drastically. So is there is any better solution for this which is much optimized?
Sorry to add some more questions to the post. Didn't wanted to create new post for the same since it will loose the continuity. Hope you can understand...
- Mariusz6 years agoCommunity Champion
Hi pbiforum123
The groups step ( list ) that we extracted from the security tables column can be replaced by an independent table with a list of all the groups, you can still refer to other objects outside of the scope of your query.
Power BI is designed to handle large volumes of records so expanding the number of rows is not an issue as long as you keep the columns in this table to the minimum.
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
LinkedIn - pbiforum1236 years agoPost Patron
Mariusz Sure thanks a lot for your assisstance. I will follow as per your guidance and will keep you posted. Expect some delay in my response since I am very new to Power BI.
Few quick things,
I am not able to understand how this connects the source table. For example after wathing your video I have created the table same as you shown ("_input ( step by step )") and copy pasted your query as that required table has been created like a magic but I am not able to understand how it has connected to above table "_input ( step by step )" rest of the steps are some what understandable. I mean after creating the table i have followed these steps, New Query --> Blank Query --> Advanced Editor , after that i am not sure what to do. Please explain for better understanding... If you can share another video which explains about the starting steps that would be great. If you can write down the steps that is also fine for me.
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]),
- pbiforum1236 years agoPost Patron
Mariusz I need your help in getting the groups from independent table. Rest was understandable! Please help...
"The groups step ( list ) that we extracted from the security tables column can be replaced by an independent table with a list of all the groups, you can still refer to other objects outside of the scope of your query."
I tried like below, hope this the right approach..
groups = List.RemoveNulls( List.Distinct( #"Replaced Value"[group] )),
groups1 = List.RemoveNulls( List.Distinct(group1[group1])),
#"Added Conditional Column" = Table.AddColumn(#"Replaced Value", "new group", each if [group] = null then groups1 else {[group]}), - Mariusz6 years agoCommunity Champion
Hi pbiforum123
You can create extra Table groups, like below
next, add a step to convert it to list.
and later you can use it in your code like below
#"Added Conditional Column" = Table.AddColumn(#"Replaced Value", "new group", each if [group] = null then groups else {[group]}),
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
LinkedIn - pbiforum1236 years agoPost Patron
Mariusz Thanks a lot! I exactly did the same as I mentioned in my previous post I think you missed it out. I got some good understanding on M Script to start with. It is all because your help and assisstance.
groups = List.RemoveNulls( List.Distinct( #"Replaced Value"[group] )), groups1 = List.RemoveNulls( List.Distinct(group1[group1])), #"Added Conditional Column" = Table.AddColumn(#"Replaced Value", "new group", each if [group] = null then groups1 else {[group]}),Please share some tutorials if you have any about the M Script.