Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello,
I have been searching here and saw some old responses but was hoping that PBI had made some progress since. I am looking to Toggle on user name as a filter like 'assigned to me' on/off with bookmarks. RLS does not help me here.
I have a columns in my data with assignee details (name , email etc.) and I want to add a toggle option for every user to filter the table with "Assigned to me" or not. I already have RLS defined by regions and I still want the users to still see his/her region, if they choose while being able to temporarily filter on themselves.
Solved! Go to Solution.
how about this.
This is a simulation using Adventure Works.
1. I have a table containing the countries that I am allowed to see, by placing the value returned by my username() into the table - on desktop for my demo.
2. this table is connected to my territories table.
3. I wrote a measure that counts how many rows are in the territories table after I filter for my name using USERNAME()
4. I added this measure to the table that shows just my data as a filter >0
You know how to do the rest I guess. I am sure you can adapt this to your needs.
https://www.dropbox.com/s/yuzoup6yfuy480f/show%20my%20regions.pbix?dl=1
Hi @bdn008 ,
The bookmark can only save the Filter, but if you want to get the user name or email to filter data only assigned to them, you may need to use a measure, but the filter cannot use the dynamic measure value, so as a workaround you can publish a report and use the dynamic RLS rules to make people only see data assigned to them.
If it doesn't meet your requirement, You can come up a new idea and add your comments there to make this feature coming sooner. https://ideas.powerbi.com/forums/265200-power-bi-ideas
Best regards,
Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks,
I am trying to keep the report agile and limiting using RLS is not going to work. Iam also awatre of the limits to filter on a measure and will add that to the backlog in the ideas.
I am still hoping that someone has a brilient idea how to toggle on the USERNAME() on a table that included the user email address. My understanding is that the services will have the user email address in the USERNAME() variable, and I can't but think it should be possible to compare and apply a filter. Just need some shared brilliance..
how about this.
This is a simulation using Adventure Works.
1. I have a table containing the countries that I am allowed to see, by placing the value returned by my username() into the table - on desktop for my demo.
2. this table is connected to my territories table.
3. I wrote a measure that counts how many rows are in the territories table after I filter for my name using USERNAME()
4. I added this measure to the table that shows just my data as a filter >0
You know how to do the rest I guess. I am sure you can adapt this to your needs.
https://www.dropbox.com/s/yuzoup6yfuy480f/show%20my%20regions.pbix?dl=1
A quick update - the solution Matt provided absolutely works per my question!
Was also to create a new measure to count regions based on the USERNAME().
Hi Matt,
I am really excited and optimistic by this approach and happy to see that brilliance is still an option here.. I will modify this approach to fit my needs. I am not sure yet but this shows a real potential being a viable approach. I will update here if I had issues.
Of course I am extra happy to see my DAX (Supercharge Power BI) instructor from last year helping here – Thanks Matt.
Side note: I highly recommend his class and can say that after completing it, I was at a much higher level of DAX and Power BI (super) User. Its the least I can do for all his help as a token of appreciation.
https://exceleratorbi.com.au/power-bi-online-training/
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
88 | |
46 | |
25 | |
21 | |
19 |