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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors