Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

setting a default value of a map

Hello EveryOne,

 

I faced problem with maps .when the user logins the map  must shows his/her accounts only by default.But When we select a user  in slicer the map must shows selected user accounts .

 

Any suggesions would be Apprciated.

 

 

Thanks,

Chunduri

 

3 REPLIES 3
v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous,

 

Based on my understanding, it looks like you would set the map display data related to accessed user account firstly, then the user can select other user account in the slicer visual to see other user's data, right? 

 

 

Currently the slicer visual doesn't have default value. You can create a calculated column in the table which stores user account name to  decide if the original user account name column is equal to current signed in user. For example, IsCurrentUser= IF([username]=UserName(),1,0)

 

Drag this calculated column to Page/Report level filter of the report, choose the value 1. So each user will see his own data when he/she access the report. They can clear this Page/Report level filter condition, then go to slicer visual to select desired account to see their data. 

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-qiuyu-msft,

 

I tried implementing the same logic by creating a new calculated column.

But is showing the below error:

 

CUSTOMDATA, USERNAME and USERPRINCIPALNAME functions are not supported in calculated tables/columns. These functions may only be used in Measures or in the AllowedRowsExpression.

 

When we are creating the measure, it is not possible to drag the measure to the report level filter.

 

Please let me know how I can proceed further.

 

Thanks,

Chunduri

 

 

Hi @Anonymous,

 

We can use Power BI RLS feature, but in this way, the current user can only see her/his own data, she/he can't see whole account in the slicer visual, so it's not able to view other user's data. One workaround may be creating two reports, one report has RLS for user see their own data, the other report without RLS for them to see desired user's data. 

 

If you would like to see user's own data then see other user's data in one report, it's not supported to do it currently. 

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.