Forum Discussion

BigLo's avatar
BigLo
Helper III
4 years ago
Solved

Combine XYPlot and Scatter Plot

Hello,

 

I want to combine an XY Plot and a scatter Plot. Is it possible?

 

For example, I want to combine these 2 graphs on a single view.

 

 

  • It's possible with a custom visual called Deneb - - but it takes a bit of learning.  

     

    More about Deneb here:

    Deneb - Declarative Visualization in Power BI (deneb-viz.github.io)

     

     

    {
      "data": {"name": "dataset"},
        "layer": [
          {
            "mark": {
              "type": "point",
              "opacity": 0.5
            },
            "encoding": {
              "x": {
                "field": "Sale Price",
                "type": "quantitative"
              },
              "y": {
                "field": "Units",
                "type": "quantitative"
              },
              "color": {
                "field": "Project",
                "type": "nominal"
              }
            }
          },
          {
            "mark": {"type": "line"},
            "encoding": {
              "x": {
                "field": "Sale Price",
                "type": "quantitative"
              },
              "y": {
                "aggregate": "mean",
                "field": "Units",
                "type": "quantitative"
              },
              "color": {
                "field": "Project",
                "type": "nominal"
              }
            }
          }
        ]
    }

     

3 Replies