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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Sammeds
New Member

Power BI - Auto select the slicer based on other visual input

Hi Power BI Community,

I’m working on a Power BI report where I want the Language slicer to auto-select the preferred language of the logged-in user.

Here’s the setup:

  • I have a table named Country, which contains:

    • Email (user's email address)

    • PreferredLanguage (e.g., English, Norwegian, etc.)

  • I have another table named Language, which is used as a disconnected slicer. It contains:

    • LanguageName (e.g., English, Norwegian, etc.)

My goal is to automatically set the Language slicer value based on the current user’s email (USERPRINCIPALNAME()), matched against their preferred language from the Country table.

I’ve already created the following DAX measure:
PreferredLanguage_Measure =
VAR CurrentUser = USERPRINCIPALNAME()
RETURN
CALCULATE(
MAX(Country[PreferredLanguage]),
Country[Email] = CurrentUser
)

However, I understand that slicers cannot auto-select values based on DAX measures directly.

 

 My questions:

  1. Is there any Power BI-supported method to auto-select a slicer value based on the logged-in user’s preference?

  2. What is the best workaround to simulate this behavior (e.g., using cards, bookmarks, or field parameters)?

  3. Are there any limitations or newer features in Power BI (as of 2024/2025) that allow dynamic slicer defaults?

I appreciate any suggestions, ideas, or best practices you can share!

Thanks in advance,
Sammed

4 REPLIES 4
v-saisrao-msft
Community Support
Community Support

Hi @Sammeds,

checking in to see if your issue has been resolved. If the response provided was helpful, kindly mark it as the solution so that others with the same issue can benefit.
Please let us know if you still need assistance.

 

Thank you.

v-saisrao-msft
Community Support
Community Support

Hi @Sammeds,

I hope you had a chance to review the solution shared by @Elena_Kalina @grazitti_sapna . If it addressed your question, please consider accepting it as the solution — it helps others find answers more quickly.
If you're still facing the issue, feel free to reply, and we’ll be happy to assist further.

 

Thank you.

Elena_Kalina
Solution Supplier
Solution Supplier

Hi @Sammeds 

Could you clarify what the final result should look like?

 

When a user opens the report, they should see:

  • A card showing the display language

  • Visual headings in the user's language

  • The actual data in the user's language (if applicable)

Key questions to determine the best approach:

  1. Approximately how many language variations are needed?
    *(If there are 10+ possible options, using bookmarks might not be practical)*

  2. Do you need the data itself to be translated?
    (This determines how many translation tables you'll need to prepare)

  3. Should we also adapt locale-specific formatting?
    (Date/number formats often vary by country/region and may need adjustment too)

Please answer these questions so we can identify the most convenient solution.

grazitti_sapna
Super User
Super User

Hi @Sammeds,

Power BI slicers can't be auto-selected using DAX measures directly, but there are clever workarounds that can simulate this behavior quite well.

Workaround 1

This measure you've already created

PreferredLanguage_Measure =
VAR CurrentUser = USERPRINCIPALNAME()
RETURN
CALCULATE(
MAX(Country[PreferredLanguage]),
Country[Email] = CurrentUser
)

Now create one measure for filtering

 

IsPreferredLanguage =
VAR CurrentLang = SELECTEDVALUE(Language[LanguageName])
VAR UserLang = [PreferredLanguage_Measure]
RETURN
IF(CurrentLang = UserLang, 1, 0)

 

Apply this measure as a filter on your visual:
In your chart or table:

  • Go to Filters on this visual pane

  • Drag in IsPreferredLanguage

  • Set it to "is 1"

Workaround 2

If you are using field parameters (2023+ feature) to control views or language switches:

  1. Set up field parameter for language using DAX.

  2. Create bookmarks per language.

  3. Based on [PreferredLanguage_Measure], show a specific bookmark using navigation logic or hidden navigation buttons.

 

🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
💡 Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
🎖 As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.
🔗 Curious to explore more? [Discover here].
Let’s keep building smarter solutions together!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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