Members

Power BI automatically modified the visible name by using drilling in a hierarchy. This works fine, so long as you didn’t alternate it manually. Luckily this belongs to the past now! Since the April 2019 Power BI desktop update, it's miles viable to apply DAX expressions to base your visible identity on. Looking at this, it might be the first step to translations for Power BI and dynamically changing texts based totally on the user's profile.

Dynamically trade titles through the usage of a hierarchy
As mentioned in the intro of this blog, it became already viable to trade the identity of your visible based totally on a hierarchy used in your chart. This labored fine until you changed the title manually. From that factor on, your identity doesn’t trade dynamically any longer. Since that is a known fact and there were no better alternatives available, we’re no longer spending any greater time on this functionality.

Change titles based totally on an expression

Since the April 2019 update, it's far feasible to change the titles of your visuals based on a DAX expression. A cool and much-wanted feature in case you ask me. So let’s begin with an honestly simple example of ways this works.

Read more: Power BI Training

First of all, we must create a measure. Imagine that we've got a slicer in our record to pick the year. With that, we need to trade the visual title dynamically. So, we do have a bar chart with a wide variety of orders with the aid of category, and we do have a slicer for 12 months. Knowing that we want to change the identity to “Number of orders using [selected year]” wherein we re-use the chosen 12 months from the slicer, or “Number of orders for a couple of years” in case there is no yr selected or multiple years selected. We will start developing a degree for this.

Table Title step 1 =
VAR SelectedYear = SELECTEDVALUE('Values'[Year]; "multiple years")
RETURN
CONCATENATE("Number of orders for "; SelectedYear)

This measure first receives the selected 12 months, however since SELECTEDVALUE can only return one result, we've got an alternative result which is “more than one years”. To use this degree as our visual title, we open the formatting pane for the visible, go to identify and over there we will right-click within the name input field. In this input field, you may select conditional formatting. With that, you can pick out your just created DAX degree to be your title.

This measure first gets the chosen yr, however on account that SELECTEDVALUE can best go back one result, we have an alternative result which is “a couple of years”. To use this measure as our visual identity, we open the layout pane for the visual, go to title and over there we can right-click in the name entry field. In this enter field, you may pick out conditional formatting. With that, you may choose your simply created DAX degree to be your title.

Next up, creating a row-level safety role which results in the most effective one row for our user desk. This will help us to trade this created courting from many-to-many to a one-to-many relationship. With this, we can actively clear out our table with translations and create any other measure. Probably I want to create a degree like this for multiple visualizations, so I added an item name in the translation desk as nicely which I will use as a clear out in my degree.

Object Title Language =
VAR UserPreferedLanguage =
SELECTEDVALUE ( Users[Language]; "EN" )
RETURN
CALCULATE (
SELECTEDVALUE ( TableTranslations[ObjectText] );
FILTER ( TableTranslations; TableTranslations[Language] = UserPreferedLanguage );
TableTranslations[Objectname] = "Visual1"
)

This degree first selects the user’s preferred language. In case there isn’t one, it returns English by default. Afterward, I get the selected item title from the table filtered on the favored language and the object name. This results in a dynamically converting title!

Now, It’s time to see matters working. So with the aid of switching the jobs with row-level-protection, I’m now able to exchange the language of this object dynamically!

To make it less complicated to understand how notable this new functionality is, I’ve created a document which you could download here. This file will help you to breed and create your dynamic item titles.

Get in-depth knowledge about BI Tools with Power BI to read Power BI online training Hyderabad

Views: 3

Comment by Elin Hooper on January 24, 2022 at 3:45am

Dynamic titles are in fact a cool feature especially given they can be changed using that simple expression. As a result of this discovery, one service among those who do my homework for money namely https://myassignmentlab.com did an excellent job integrating this feature into my online project, so now I feel more or less secured and won't miss the deadline and can focus on other course disciplines, like engineering and math.

Comment

You need to be a member of On Feet Nation to add comments!

Join On Feet Nation

© 2024   Created by PH the vintage.   Powered by

Badges  |  Report an Issue  |  Terms of Service