Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
Check it out now!Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hello,
In Deneb / Vega-Lite, I would like to group a matrix based on the column 'Customer' and 'Product' but I only get it working for one group but I want both on row level and not column level.
This is my code:
{
"data": {
"values": [
{"Customer": "Kevin N.V.", "Product": "PH114", "YearMonthText": "2024.01", "Column": "Forecast", "_Value": 24},
{"Customer": "Kevin N.V.", "Product": "PH114", "YearMonthText": "2024.01", "Column": "Percentage", "_Value": 0.90},
{"Customer": "Kevin N.V.", "Product": "PH114", "YearMonthText": "2024.02", "Column": "Forecast", "_Value": 74},
{"Customer": "Kevin N.V.", "Product": "PH114", "YearMonthText": "2024.02", "Column": "Percentage", "_Value": 0.75},
{"Customer": "Kevin N.V.", "Product": "PH878", "YearMonthText": "2024.01", "Column": "Forecast", "_Value": 744},
{"Customer": "Kevin N.V.", "Product": "PH878", "YearMonthText": "2024.01", "Column": "Percentage", "_Value": 0.05},
{"Customer": "Kevin N.V.", "Product": "PH878", "YearMonthText": "2024.02", "Column": "Forecast", "_Value": 4},
{"Customer": "Kevin N.V.", "Product": "PH878", "YearMonthText": "2024.02", "Column": "Percentage", "_Value": 0.07},
{"Customer": "Klaas N.V.", "Product": "PH200", "YearMonthText": "2024.01", "Column": "Forecast", "_Value": 77},
{"Customer": "Klaas N.V.", "Product": "PH200", "YearMonthText": "2024.01", "Column": "Percentage", "_Value": 0.65},
{"Customer": "Klaas N.V.", "Product": "PH200", "YearMonthText": "2024.02", "Column": "Forecast", "_Value": 80},
{"Customer": "Klaas N.V.", "Product": "PH200", "YearMonthText": "2024.02", "Column": "Percentage", "_Value": 0.8},
{"Customer": "Klaas N.V.", "Product": "PH527", "YearMonthText": "2024.01", "Column": "Forecast", "_Value": 4},
{"Customer": "Klaas N.V.", "Product": "PH527", "YearMonthText": "2024.01", "Column": "Percentage", "_Value": 0.77},
{"Customer": "Klaas N.V.", "Product": "PH527", "YearMonthText": "2024.02", "Column": "Forecast", "_Value": 88},
{"Customer": "Klaas N.V.", "Product": "PH527", "YearMonthText": "2024.02", "Column": "Percentage", "_Value": 0.9}
]
},
"facet": {
"row": {
"field": "Product",
"title": null,
"header": {"labelFontSize": 14}
}
},
"spec": {
"encoding": {
"y": {
"field": "Column",
"title": null
},
"x": {
"field": "YearMonthText",
"title": null,
"axis": {"orient": "top"}
}
},
"layer": [
{"mark": {"type": "rect"}},
{
"mark": {
"type": "text",
"fontSize": 12
},
"encoding": {
"text": {
"field": "_Value",
"type": "quantitative"
}
}
}
]
}
}
Kind regards
something like this? Faceting a Plot into a Trellis Plot | Vega-Lite
Why Deneb and not a regular chart like a multi card or a matrix?