Search code examples
powerbipowerbi-embeddedpowerbi-datasource

How to add a text to tool-tips


I have two columns (EBELN - Data Type is Text), (MATKL - Data Type is Text). I want to add them to tool-tips but it is shown as count.

How can I show it as text?

enter image description here


Solution

  • The trick to remember here is that your chart is aggregating data. In other words, for a single date (BEDAT), there may be many MENGE values that are either being summed or averaged or counted.

    To create a text tooltip, you can't drag in a text column because, while 3 MENGE values can be easily summed, 3 corresponding tooltip values can't be summed.

    What you need to do is create a measure that calculates the text based on the aggregated MENGE values. For example:

    Text Tooltip = IF(SUM(Sheet1[MENGE])>100,"This is excellent","This is terrible")
    

    You can then drag that text measure into the tooltip field (because you've said exactly what you want the text to be regardless of whether you've got one MENGE value, or 3, or 300 for a single BEDAT).

    There's more information and code samples in the Power BI forums, for example here: https://community.powerbi.com/t5/Desktop/How-can-I-make-Tool-tips-display-text-instead-of-count/td-p/44582

    Dustin Ryan also has a good blog post on this here: https://sqldusty.com/2016/06/29/5-more-power-bi-tips/