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

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.

Reply
Anonymous
Not applicable

Deneb Line Chart using "repeat"

Hi everyone,
I am trying to make a multiple views line chart in @deneb. Its a replication of what Power BI guy made in this video.(link attached at the end). My line chart however, has two scenarios: Act and Bud. I was able to get those. However, I want budget line to be a dotted line and I am not able to get it. Could you please help with it?
Power BI file and Code attached below:
What I can do so far:

dhee_0-1684208351887.png


Power BI link:
https://drive.google.com/file/d/1Eghfv1IYX4zzcsIvXT7emUrHbN41EaWN/view?usp=sharing

Deneb Code:
{
"title": {
"anchor": "middle",
"align": "center",
"offset": 10,
"text": "Ratio Analysis",
"font": "Segoe UI",
"fontSize": 16,
"fontWeight": "bold",
"fontStyle": "normal",
"subtitle": "Monthly Comparision",
"subtitleFontSize": 12,
"subtitleFontStyle": "italic"
},
"data": {"name": "dataset"},
"repeat": [
"Bonus T",
"Pts Rolling T",
"Total Pts by GW T"
],
"columns": 1,
"spec": {
"mark": "trail",
"encoding": {
"x": {
"field": "Round",
"type": "ordinal",
"title": null
},
"y": {
"field": {"repeat": "repeat"},
"type": "quantitative",
"formatType": "pbiFormat",
"format": "#.00%"
},
"color": {
"field": "Scenario",
"type": "nominal",
"scale": {
"range": ["black", "gray"]
}
},
"tooltip": [
{
"field": "Round",
"type": "ordinal"
},
{
"field": {"repeat": "repeat"},
"type": "quantitative",
"formatType": "pbiFormat",
"format": "#.00%"
}
]
}
},
"resolve": {
"scale": {
"x": "independent",
"size": "independent"
}
}
}

Power BI guy Youtube link:
https://www.youtube.com/watch?v=I6FZYTSKI6Y&list=PL6oIJxyQvMGTxh4tREeKflcKVlOfGdyim&index=2


1 REPLY 1
v-jianboli-msft
Community Support
Community Support

Hi @Anonymous ,

 

Maybe you can use the layer operator.

Sometimes, it’s useful to superimpose one chart on top of another. You can accomplish this by using the layer operator. This operator is one of Vega-Lite’s view composition operators. To define a layered chart, put multiple specifications into an array under the layer property.

 

For more details, refer to:

Layering views | Vega-Lite 

 

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.