Formula Generator | DAX

DAX Formula for Chiclet Buttons with Combined Titles

This guide provides a DAX formula to create concatenated titles from two fields for chiclet buttons in Power BI, enhancing user interaction with clearer visualization titles.


Empty image or helper icon

Prompt

I want 2 row titles on my chiclet buttons using data from the two fields

Answer

DAX Formula for Chiclet Buttons with Two Row Titles

Objective

To create a DAX formula that combines two field values to display as row titles on chiclet buttons.

DAX Formula

Assuming the two fields are named Field1 and Field2, the DAX formula to create a concatenated title can be written as:

CombinedTitle = [Field1] & " - " & [Field2]

Explanation of the Formula

  • CombinedTitle: This is the name of the new calculated column/measure.
  • [Field1]: Reference to the first field whose values will be used.
  • &: The concatenation operator in DAX, which merges the values of the fields.
  • " - ": A string used as a separator between the two field values. You can customize this separator based on your preferences.
  • [Field2]: Reference to the second field.

Practical Illustration

Scenario

Consider a dataset containing the following fields:

  • ProductCategory: e.g., "Beverages"
  • ProductSubcategory: e.g., "Juices"

Usage Example

To create a single title for each record that combines the two fields, you can implement the DAX formula as follows:

  1. Add a new calculated column to your table.
  2. Use the formula:
CombinedTitle = 'Products'[ProductCategory] & " - " & 'Products'[ProductSubcategory]

Result

This formula would generate titles like:

  • "Beverages - Juices"
  • "Beverages - Soft Drinks"
  • "Dairy - Cheese"

Application Scope

This DAX formula can be used in Power BI visualizations, notably in chiclet buttons, allowing users to interact with a more descriptive and informative interface.

Conclusion

Using DAX to combine multiple field values into a single string enhances data interactivity and clarity in visualizations. For deeper insights and functionalities, consider exploring advanced DAX courses available on the Enterprise DNA Platform.

Create your Thread using our flexible tools, share it with friends and colleagues.

Your current query will become the main foundation for the thread, which you can expand with other tools presented on our platform. We will help you choose tools so that your thread is structured and logically built.

Description

This guide provides a DAX formula to create concatenated titles from two fields for chiclet buttons in Power BI, enhancing user interaction with clearer visualization titles.