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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

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
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.

Top Solution Authors