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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
inthemeadow
Regular Visitor

How can I make Tool tips display text instead of count?

Hello! I'm brand new to Power BI and I've got a complicated question already.

 

I have a bunch of survey results that can be grouped by a number of different buckets. The survey questions are also grouped into categories.

 

I organized my visualization to show an average score by category. My tooltip shows the Category and the Average score (with no decimals).

 

I want to add a description to the tooltip, based on the average answer. For example, average score = 2 would return a description of "Level 2 means some projects are using best practice but not many."

 

I have data that links the score (1-5) and the description. In Excel terms I would do a vlookup: (average score,table of scores & descriptions,description column number, true). I can't figure out how to reference the average score and use that to find the related description. When I try bringing descriptions into the Tool Tips, I just get "Count" instead of the text. 

 

Is this possible??

 

Thank you!

13 REPLIES 13
KHorseman
Community Champion
Community Champion

Assuming average score is a measure, write a new measure that returns some text description based on values for the average.

 

Tooltip Description = SWITCH(

[Average Score],

1, "Level 1 means something something something.",

2, "Level 2 means some projects are using best practice but not many.",

3, "Level 3 means something else something something.",

4, "Level 4 means you probably get the idea by now.",

5, "Level 5 means I'm still typing this example.",

"This is a default for when the average score is blank or 6 or 97 or whatever.")

 

Then put that measure into the tooltip box.





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

Proud to be a Super User!




Average score is the Quick Calc of the Value in the visualization. Does that change the approach? 

This is why I always write out measures explicitly instead of relying on quick calcs.

 

Tooltip Description = SWITCH(

AVERAGE(TableName[ColumnName]),

1, "Level 1 means something something something.",

2, "Level 2 means some projects are using best practice but not many.",

3, "Level 3 means something else something something.",

4, "Level 4 means you probably get the idea by now.",

5, "Level 5 means I'm still typing this example.",

"This is a default for when the average score is blank or 6 or 97 or whatever.")

 

...where TableName[ColumnName] is whatever thing you put in the value box to get that average.





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

Proud to be a Super User!




Thank you, i will give it a try!

@inthemeadow

 

In this scenario, if you have a table which includes data that links the score (1-5) and the description, you can use LOOKUPVALUE() to get the description and show it in the Tooltips. Please refer to following steps.

I assume you have two tables as below

123.png

  1. Create a measure for average score by category with following formula.
    AverageScore_PerCategory = 
    ROUND (
        CALCULATE (
            AVERAGE ( ScoresTable[Scores] ),
            ALLEXCEPT ( ScoresTable, ScoresTable[Category] )
        ),
        0
    )
    
  2. Create a measure for the description displayed in the Tooltips.
    Score_Description = 
    LOOKUPVALUE (
        'Description'[Description],
        'Description'[Score], [AverageScore_PerCategory]
    )
    
  3. Drag the visuals you wanted into your canvas. I used a Stacked column chart and a Table chart here.
    456.png

The solution using SWITCH() which provided by @KHorseman  should also be OK.

 

Regards,

@v-sihou-msft

 

I tried your approach and the measure for average score is working, although I still needed to use the "Average" quick calc to show the correct values. However the description lookup doesn't bring back full results and still shows up as a "Count" in the tool tips. Do I need to turn off quick calcs?

 

 

 

 

Capture1.PNGCapture2.PNG

 

@v-sihou-msft 

I had a filter turned on which is why the description lookup was missing some results. When I realized this, I saw that when I use the calculated measure in the visualization, the report filters don't work on it. So I want to keep my original data and use the Quick Calc to show the average by category. When I do this, I still see a Count of description in Tool Tips.

 

Capture3.PNGCapture4.PNG

I still have this issue when I try the "SWITCH" formula too. Both are doing the right thing and looking up the description that corresponds to the score. But the tool tip still displays "Count" instead of the description itself.

Sean
Community Champion
Community Champion

@inthemeadow are you creating a MEASURE? From what you are describing looks like you are creating a COLUMN!

YES that was the problem Smiley Very Happy

 

Thank you for correcting me. It works perfectly now and I'm very happy with my dashboard!!!!

No, no, no I spoke too soon. It isn't working perfectly. 

Now that I'm using MEASURE I do see the text in the Tool Tip so that is working. Thank you!!

 

The problem is with the 

RoundAverageScore_PerCapability = round (calculate (average('Fact1 (3)'[Answer]),allexcept('Fact1 (3)','Fact1 (3)'[Capability])),0)

 

This is bringing back the overall average of all the answers combined, instead of separating it out by Capability. Therefore the ToolTip is showing the same definition for each Capability, instead of a different one per Capability, based on the average answer for that Capability. 

 

Capture5.PNGCapture6.PNG

 

 

Sean
Community Champion
Community Champion

@inthemeadow Assuming your Fact1 (3) table is setup as @v-sihou-msft did in the test file he had created

 

There's nothing wrong with the MEASURE => [RoundAverageScore_PerCapability]

 

Have you tried this MEASURE (it also works!)

 

Tooltip Description = 
SWITCH (
    [RoundAverageScore_PerCapability],
    1, "Tooltip 1",
    2, "Tooltip 2",
    3, "Tooltip 3",
    4, "Tooltip 4",
    5, "Tooltip 5",
    "Off the Chart!"
)

 

Tooltips Text.png

Same problem, it is returning Tooltip 2 for all the values.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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