Evenementer
Power BI DataViz World Championships
Feb 14, 4 PM - Mar 31, 4 PM
Mat 4 Chance fir matzemaache kënnt Dir e Konferenz-Pak gewannen an op d’LIVE Grand Finale zu Las Vegas kommen
Méi gewuer ginnDëse Browser gëtt net méi ënnerstëtzt.
Upgrat op Microsoft Edge fir vun de Virdeeler vun leschten Eegeschaften, Sécherheetsupdaten, an techneschem Support ze profitéieren.
APPLIES TO:
Power BI Desktop
Power BI service
You can create dynamic, customized titles for your Power BI visuals. By creating Data Analysis Expressions (DAX) based on fields, variables, or other programmatic elements, your visuals' titles can automatically adjust as needed. These changes are based on filters, selections, or other user interactions and configurations.
Creating dynamic titles, sometimes called expression-based titles, is straightforward.
The first step in creating an expression-based title is to create a field in your model to use for the title.
There are all sorts of creative ways to have your visual title reflect what you want it to say or what you want to express. Let's take a look at a couple of examples.
You can create an expression that changes based on the filter context that the visual receives for the product's brand name. The following image shows the DAX formula for such a field.
Another example is using a dynamic title that changes based on the user's language or culture. You can create language-specific titles in a DAX measure by using the USERCULTURE()
function. This function returns the culture code for the user, based on their operating system or browser settings. You can use the following DAX switch statement to select the correct translated value.
SWITCH (
USERCULTURE(),
"de-DE", “Umsatz nach Produkt”,
"fr-FR", “Ventes par produit”,
“Sales by product”
)
Or, you can retrieve the string from a lookup table that contains all the translations. You place that table in your model.
These are just a couple of examples you can use to create dynamic, expression-based titles for your visuals in Power BI Desktop. What you can do with your titles are limited only by your imagination and your model.
After you've created the DAX expression for the field you create in your model, you need to apply it to your visual's title. To select the field and apply it:
Go to the Visualizations pane. In the Format area, select the General tab, and then set Title to On to show the title options for the visual.
Next to the Title text, select Conditional formatting (fx).
The Title text - Title dialog box appears.
From the dialog box, select the field that you created to use for your title, and then select OK.
There are a few limitations to the current implementation of expression-based titles for visuals:
This article described how to create DAX expressions that turn the titles of your visuals into dynamic fields that can change as users interact with your reports. You might find the following articles useful as well.
Evenementer
Power BI DataViz World Championships
Feb 14, 4 PM - Mar 31, 4 PM
Mat 4 Chance fir matzemaache kënnt Dir e Konferenz-Pak gewannen an op d’LIVE Grand Finale zu Las Vegas kommen
Méi gewuer ginnTraining
Modul
Create visual calculations in Power BI Desktop - Training
Calculations in Power BI are necessary to enrich data analysis. Visual calculations simplify complex formulas, enhance performance, and reduce maintenance.
Zertifizéierung
Microsoft Certified: Power BI Data Analyst Associate - Certifications
Demonstrate methods and best practices that align with business and technical requirements for modeling, visualizing, and analyzing data with Microsoft Power BI.
Dokumentatioun
Apply conditional table formatting in Power BI - Power BI
Learn how to apply customized conditional formatting to tables and matrixes in Power BI, including color gradients, data bars, KPI icons, and web links.
Use gridlines and snap-to-grid in Power BI reports - Power BI
Learn how to use gridlines, snap-to-grid, smart guides, z-order, alignment, and distribution in Power BI reports.
Use grouping and binning in Power BI Desktop - Power BI
Learn how to group and bin elements to ensure the visuals in your reports show your data the way you want them to.