Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi Everyone,
I’ve recently started learning how to work with Vega-Lite.
I’m looking to produce a form of academic calendar visualisation through Power BI/Deneb (with rows per term and columns per week). As the data is quite sparse, I opted to use Vega-Lite transform statements such as ‘impute’ to fill in gaps in the data.
Although the specification works as expected within the Vega-Lite online editor environment (see simplified code sample below), the equivalent specification doesn’t fully work within Deneb. There don’t appear to be any errors or warnings, but the ‘impute’ statements don’t seem to have any effect.
Is it possible to use the ‘impute’ statement to add records to a Deneb ‘dataset’? If not, is there an alternative/better way to achieve the desired outcome?
Thanks in advance
Simplified Vega-Lite specification…
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {
"values": [
{"Term": "Term 1", "Week No": "Wk. 1", "Description": "Lesson 1", "Attendance": 1, "Attendance Text": "Attended"},
{"Term": "Term 1", "Week No": "Wk. 5", "Description": "Lesson 2", "Attendance": 3, "Attendance Text": "Unauthorised Absence"},
{"Term": "Term 2", "Week No": "Wk. 2", "Description": "Lesson 3", "Attendance": 1, "Attendance Text": "Attended"},
{"Term": "Term 2", "Week No": "Wk. 6", "Description": "Lesson 4", "Attendance": 2, "Attendance Text": "Authorised Absence"},
{"Term": "Term 3", "Week No": "Wk. 7", "Description": "Lesson 6", "Attendance": 0, "Attendance Text": "Future Event"}
]
},
"transform": [
{
"impute": "Attendance Text",
"key": "Term",
"keyvals": ["Term 1", "Term 2", "Term 3"],
"value": "No Event"
},
{
"impute": "Attendance Text",
"key": "Week No",
"keyvals": ["Wk. 1", "Wk. 2", "Wk. 3", "Wk. 4", "Wk. 5", "Wk. 6", "Wk. 7", "Wk. 8"],
"value": "No Event",
"groupby": ["Term"]
}
],
"mark": "rect",
"encoding": {
"x": {"field": "Week No"},
"y": {"field": "Term"},
"color": {"field": "Attendance Text"}
}
}
Sample output…
@lbendlin - Deneb uses the Vega-Lite parser, so it's supported. It seems to work as I would expect if I take the sample spec and create a visual with it:
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Thanks for confirming Daniel. I'll investigate further.