cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Chunduri Regular Visitor
Regular Visitor

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
Moderator v-qiuyu-msft
Moderator

Re: setting a default value of a map

Hi @Chunduri,

 

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.
Chunduri Regular Visitor
Regular Visitor

Re: setting a default value of a map

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

 

 

Moderator v-qiuyu-msft
Moderator

Re: setting a default value of a map

Hi @Chunduri,

 

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.