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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
tableauspoiled
Frequent Visitor

Deneb Marginal Histogram

Hi y'all,

I got all excited to build this chart in the Deneb visualization.  But I can't figure out how!!!

tableauspoiled_0-1687549183791.png

 

I think it's called a marginal histogram.  I found some Json code that supposedly builds something similar, but I can't seem to twist it to make it work on my data set.

 

I've got a table called 'Opportunity', a measure called [Leads], and a date table/date field: Date[Month Year]

 

I borrowed this code from github and edited it with my field names (I'll post the actual code in comments in case anyone needs it, but picture for sake of simple visibility at once):

tableauspoiled_5-1687549461183.png     tableauspoiled_6-1687549495862.png


And all I get is a set of ugly error/warning messages:

tableauspoiled_1-1687549287087.png

 

Am I incorrectly replacing a field?  Am I naming my dataset wrong?  The initial code called a schema first, but I don't know what that would involve here.  The tables originate in Salesforce and pulled into Power Query to clean/organize.  There are multiple other tables and relationships between them in the report.  I'd like to use this chart-type for other visualizations that might require me to pull from multiple tables at once--or at least use measures that involve USERELATIONSHIP commands.  I'm not sure if that would impact how I need to bring in the dataset on the json code.

 

I know it might be asking a lot--I genuinely don't know how big a lift this answer might be--but I know next to nothing about json, so if it's possible to simplify the explanation, I'd greatly appreciate it. 🙂

 

Thanks so much!

 

1 REPLY 1
tableauspoiled
Frequent Visitor

My json code (borrowed and edited from github):
{
"data": {"name": "dataset"},
{
"spacing": 15,
"bounds": "flush",
"vconcat": [
{
"mark": "bar",
"height": 60,
"encoding": {
"x": {
"bin": true,
"field": "Month Year",
"axis": null
}
},
"data": {"name": "dataset"},
"y": {
"aggregate": "Leads",
"scale": {
"domain": [0, 1000]
},
"title": ""
}
}
]
},
{
"data": {
"name": "dataset",
"spacing": 15,
"bounds": "flush",
"hconcat": [
{
"mark": "rect",
"encoding": {
"x": {
"bin": true,
"field": "Month Year"
},
"y": {
"bin": true,
"field": "Product"
},
"color": {
"aggregate": "Leads"
}
}
},
{
"mark": "bar",
"width": 60,
"encoding": {
"y": {
"bin": true,
"field": "Product",
"axis": null
},
"x": {
"aggregate": "Leads",
"scale": {
"domain": [0, 1000]
},
"title": ""
}
}
}
]
}
}
]

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Top Solution Authors
Top Kudoed Authors