0

I'm working on a report design, which has quite specific requirements for chart behavior. Using Deneb, I've created small multiples looking like this, with bars/labels being some sort of KPI, and number below is calendar week:

enter image description here

Using param with select / mouseover I've managed to dynamically change label. Here's my param code:

        "params": [
          {
            "name": "displayOnHover",
            "select": {
              "type": "point",
              "fields": [
                "Calendarweek"
              ],
              "toggle": false,
              "nearest": false,
              "on": "mouseover",
              "clear": "mouseout"
            }
          }
        ]

And here's my filter code on label text mark:

          {
            "filter": {
              "param": "displayOnHover",
              "empty": false
            }
          }

So all my label change based on which calendar week is being hovered over in barchart. So far, so good. However, there's another requirement. I need to display tooltip for label, and tooltip is another page in Power BI.

My label mark:

        "mark": {
          "type": "text",
          "align": "center",
          "dy": -50,
          "fontSize": 21,
          "fontWeight": "bold",
          "tooltip": true
        }

My tooltip settings: enter image description here

Weirdly, tooltip works properly when hovering over barchart (also with tooltip: true in mark), but not for label unless I remove displayOnHover param.

Also I've tried adding another layered mark that wouldn't be filtered by displayOnHover, and it doesn't display tooltip as well, unless I remove displayOnHover param from bar.

  • Can you supply a working .pbix and clarify your expected results? – Davide Bacci Mar 13 '23 at 09:29
  • Sure, I'll prepare it later today (it's for commercial project so I need to recreate it on different dataset). As for expected results: - Power BI tooltip, defined in options, should be showing up when hovering the label (which it, currently, doesn't) - label should remain dynamic, based on which bar user is hovering over in barchart, via param (it works) – Michał Ozimek Mar 13 '23 at 10:33

0 Answers0