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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
jjustjjo
Helper I
Helper I

Conditional Text in a TT page based on segment hovered in stacked column chart

I have a stacked column chart wih three measures on the Y axis:

jjustjjo_0-1775767847781.png

I have as tooltip page defined, but want to add conditional text based on which segement I'm hovering over (Late, On Time, Completed).  How do I do this?  I've tried

  • selectedmeasurename() returned the name of the measure I tried
  • isblank([% Late]) thinking maybe it would be if it weren't hovered over but that doesn't work

The goal is to be able to say " were <Late|On Time|Completed> based on the segment hovered.  I'm also planning on hiding a table of info if Late is not hovered.
Can this be done?  Thanks in advance!

 

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @jjustjjo 

When you use separate measures in a visual, the tooltip page can’t tell which one is being hovered. Measures don’t have row context, so there’s no filter value to pass through. A common workaround is to create a disconnected table with a column of measure names, then reference that column in a conditional measure.

danextian_0-1775817733052.png

danextian_2-1775817958580.gif

 

Please see the attached pbix.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

2 REPLIES 2
danextian
Super User
Super User

Hi @jjustjjo 

When you use separate measures in a visual, the tooltip page can’t tell which one is being hovered. Measures don’t have row context, so there’s no filter value to pass through. A common workaround is to create a disconnected table with a column of measure names, then reference that column in a conditional measure.

danextian_0-1775817733052.png

danextian_2-1775817958580.gif

 

Please see the attached pbix.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Hans-Georg_Puls
Super User
Super User

Hi @jjustjjo ,

I’ve found a way to determine the column segment. It’s more complicated than I’d thought, and I hope it works in your report too.

 

The solution is based on a calculation group:

  1. Define a new calculation group named "Column Segments"
  2. Name the column of the calculation group something like "Selected Measure"
  3. Define a calculation item for every of your measures defining the segments. Every items should look like the following one:
    A Name for the Segment = IF(SELECTEDMEASURENAME() = "Chart Dummy",
        [your measure for the segment],
        SELECTEDMEASURE()
    )
    (The IF clause ensures that the only a measure called "Chart Dummy" will be replaced by your segment measures)
  4. Define the Chart Dummy measure:
    Chart Dummy = 0
    (The exakt definition is irrelevant, because the measure is replaced by the measures defined in the calculation items)
  5. Add Chart Dummy as the only value to the y-axis of your chart
  6. Add Column Segments[Selected Measure] as a legend to your chart
  7. Now it should be possible to use the following measure to detect the selected segment at your tooltip page
    Tooltip Measure Detector = SELECTEDVALUE('Column Segments'[Selected Measure], "No selection")
  8. Here is an impression from my demo:
    HansGeorg_Puls_0-1775776356389.pngHansGeorg_Puls_1-1775776411835.png

     

Hope that works for you too.

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.