Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello, is there a way to create a slicer to show records where one field = my username (its a one table dashboard)? I want to give users an Option of selecting their records vs everyone elses.
My idea was to create this measure then shove it in a slicer but it wont allow it:
@AllisonKennedy Thank you for the info, unfortunately USERPRINCIPALNAME() cannot be used in a calculated column so it looks like I have no choice to use bookmarks along with visual level filters (which is not ideal). Wonder why you cant use measures on the page filter level but you can on the visual level?
Sorry for the EXTREME delay in this reply.
Just in case anyone still uses this post, the reason you can't use measures as page level filters is because of context - the measure evaluates to a single value, that value depends on the slicers and filter context of the visual the measure is used in. If you applied a filter at the page level, you don't have enough context to know which values to filter out. Would be cool if it was smart enough to know that you wanted to apply it individually to the context of all the visuals and do this a separate filters, though this could potentially get slow and have performance implications.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@AdamWhittaker Great question - I have been pondering something very similar for a project I'm working on.
Measures can't be used in Slicers, so you need to either use bookmarks and visual level filters, or create a calculated column.
You would ideally have a User or Submitter dimension table, related to the RecordTable by [SubmitterEmail]. If not, you can just do this on the RecordTable, but that's not the ideal star schema.
In any case, create a new calculated column:
Submitter Filter =
SWITCH ( TRUE(),
TableName[SubmitterEmail] = USERPRINCIPALNAME(), "My Records",
"Others Records" --You could also use the SubmitterEmail here - uncomment the line below and comment out this line
-- TableName[SubmitterEmail]
)
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com