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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
asodie
Helper I
Helper I

Vega-lite in Deneb: Tooltip showing "False" instead of unique identifier

I am new to using Vega-lite through Deneb in Power BI. I am creating a bubble chart as a timeline view. I included my code below. The size of the bubbles in based on value, the date is the x-axis, and the prob is the y-axis. Everything works perfectly except the tooltip. For ID#, instead of showing the number it shows "False". If I put ID# in the labels for each bubble it shows the number just fine, so I'm not sure why it's showing "False" instead of the ID number in the tooltip. Thanks!

I based my chart off this one: https://vega.github.io/vega-lite/examples/circle_natural_disasters.html

 

{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "data": {
    "name": "dataset"
  },
  "width": 950,
  "height": 400,
  
  "encoding": {
    "x": {
      "field": "Date",
      "type": "temporal",
      "axis": {"grid": false, "format":"Q%q %Y", "title":"Date"}
    },
    "y": {
      "field": "Prob", 
      "type": "quantitative", 
      "axis": {"title": "Prob"}
    },
    "tooltip" : [
                {"field":"Title", "type": "nominal"},
                {"field":"ID#", "type":"nominal"},
                {"field":"Amount", "type": "quantitative"},
                {"field":"Description", "type":"nominal"}
                ]
  },
  
  
  "layer":[{
      "mark":{
        "type": "circle",
        "opacity": 0.8,
        "stroke": "black",
        "strokeWidth": 1
      },
      "encoding": {
          "size": {
                "field": "Amount",
                    "type": "quantitative",
                    "title": "",
                    "legend": "",
                    "scale": {"rangeMax": 5000}
                 },
              "color": {
                    "field": "Type", 
                    "type": "nominal"
           }
        }
    },
    
    
    {
      "mark":{
      "type": "text",
      "align": "left",
      "baseline": "top",
      "dx": 5,
      "limit":200,
      "angle":-25
    },
      "encoding": {
        "text":{"field":"Title", "type":"nominal"}
      }
    }
  ]
  
}
1 ACCEPTED SOLUTION
asodie
Helper I
Helper I

I was able to solve this problem: changing the data type in PBI fixed this for me. I had stored it as a text field because I didn't want it to be summarized as a number. Changing it to a numeric data type fixed the problem!

View solution in original post

1 REPLY 1
asodie
Helper I
Helper I

I was able to solve this problem: changing the data type in PBI fixed this for me. I had stored it as a text field because I didn't want it to be summarized as a number. Changing it to a numeric data type fixed the problem!

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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