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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Dave_Start
New Member

Mouse over dynamically show content based on position

Dear experts, searching for a few months now... 

In short: dynamically (generic implementation) show text in callout on columnnames based on dataset and columnname.

Was familiar with other BI environment, but needed to change to PowerBI

 

Starting point data with a sample report (at the right) showing descriptions of columns dynamically.

So, I do not want to program this for every field separately (imagine you need to develop hundreds of reports with this functionality....)

 

Many thanks in advance if you are able to provide some guidance in this!

Dave

 

Data structureData structureSnap2.jpg

 

1 ACCEPTED SOLUTION
johnbasha33
Solution Sage
Solution Sage

@Dave_Start 

To dynamically show text descriptions for column names in Power BI, you can use DAX expressions combined with a supporting lookup table. Here's a step-by-step guide on how to achieve this:

1. **Create a Lookup Table**: Create a table in Power BI that contains two columns: one for column names and another for their corresponding descriptions. This table will act as a lookup table.

2. **Load the Lookup Table**: Load the lookup table into your Power BI model.

3. **Create a DAX Measure**: Create a DAX measure that dynamically retrieves the description for a selected column name. You can use functions like SELECTEDVALUE and RELATED to achieve this. Here's an example of how to create such a measure:

```DAX
ColumnDescription =
VAR SelectedColumnName = SELECTEDVALUE('YourTable'[Column Name])
RETURN
IF(
ISBLANK(SelectedColumnName),
BLANK(),
RELATED('LookupTable'[Description])
)
```

Replace `'YourTable'` with the name of your table containing the column names, and `'LookupTable'` with the name of your lookup table.

4. **Display the Description in a Visual**: Add a visual (such as a card or a table) to your report canvas. Use the newly created measure (`ColumnDescription`) in this visual to dynamically display the description for the selected column name.

5. **Test and Customize**: Test your report to ensure that the descriptions are dynamically displayed based on the selected column name. You can customize the lookup table with additional descriptions as needed.

By following these steps, you can dynamically show text descriptions for column names in Power BI without the need to manually program each field separately. This approach allows for a generic implementation that can be easily applied to multiple reports with different datasets and column names.

Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!

View solution in original post

3 REPLIES 3
johnbasha33
Solution Sage
Solution Sage

@Dave_Start 

To dynamically show text descriptions for column names in Power BI, you can use DAX expressions combined with a supporting lookup table. Here's a step-by-step guide on how to achieve this:

1. **Create a Lookup Table**: Create a table in Power BI that contains two columns: one for column names and another for their corresponding descriptions. This table will act as a lookup table.

2. **Load the Lookup Table**: Load the lookup table into your Power BI model.

3. **Create a DAX Measure**: Create a DAX measure that dynamically retrieves the description for a selected column name. You can use functions like SELECTEDVALUE and RELATED to achieve this. Here's an example of how to create such a measure:

```DAX
ColumnDescription =
VAR SelectedColumnName = SELECTEDVALUE('YourTable'[Column Name])
RETURN
IF(
ISBLANK(SelectedColumnName),
BLANK(),
RELATED('LookupTable'[Description])
)
```

Replace `'YourTable'` with the name of your table containing the column names, and `'LookupTable'` with the name of your lookup table.

4. **Display the Description in a Visual**: Add a visual (such as a card or a table) to your report canvas. Use the newly created measure (`ColumnDescription`) in this visual to dynamically display the description for the selected column name.

5. **Test and Customize**: Test your report to ensure that the descriptions are dynamically displayed based on the selected column name. You can customize the lookup table with additional descriptions as needed.

By following these steps, you can dynamically show text descriptions for column names in Power BI without the need to manually program each field separately. This approach allows for a generic implementation that can be easily applied to multiple reports with different datasets and column names.

Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!

Thank y so much for guidance, we will explore this next days.

Dave

@Dave_Start  looking forward to it. 🙂

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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