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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
JayWee
Frequent Visitor

Deneb: Use Calculation For Window Frame

Hi All,

 

Can i please find out whether does vega lite support calculation values in the Frame?

Frame.png

Please advie.

 

Thanks in advance.

 

Jay

 

 

2 ACCEPTED SOLUTIONS
Akash_Varuna
Super User
Super User

Hi @JayWee According to the Vega-Lite documentation, frame expects an array with two elements:

  • The start of the frame relative to the current data object.
  • The end of the frame relative to the current data object.

the frame property does not support dynamic expressions or calculations parseInt(datum.MvgAVG) * -1 .

It requires static numeric values or null. 
For more details on transformations please check this documentation Vega-Lite Window Transform documentation.
If this post helped please do giev a kudos and accept this as a solution
Thanks In Advance

View solution in original post

Anonymous
Not applicable

Hi @JayWee,

Thank you for reaching out in Microsoft Community Forum.

Thank you @Akash_Varuna  for the helpful response.

Please follow below steps to replace the start frame using slicer;

1.Vega-Lite's frame property only accepts static numeric values (e.g., [-1, 1]) — it cannot use dynamic expressions like parseInt(datum.X) or respond to slicers.

2.Slicers in Power BI cannot dynamically control frame in a Vega-Lite spec — it’s not interactive in that way.

3.To achieve dynamic behavior, perform the calculation in DAX or Power Query and pass the result to Vega-Lite.

4.Alternatively, use native Power BI visuals for dynamic rolling windows or frame-based calculations.

Please continue using Microsoft Community Forum.

If this post helps in resolve your issue, kindly consider marking it as "Accept as Solution" and give it a 'Kudos' to help others find it more easily.

Regards,
Pavan.

View solution in original post

4 REPLIES 4
Akash_Varuna
Super User
Super User

Hi @JayWee According to the Vega-Lite documentation, frame expects an array with two elements:

  • The start of the frame relative to the current data object.
  • The end of the frame relative to the current data object.

the frame property does not support dynamic expressions or calculations parseInt(datum.MvgAVG) * -1 .

It requires static numeric values or null. 
For more details on transformations please check this documentation Vega-Lite Window Transform documentation.
If this post helped please do giev a kudos and accept this as a solution
Thanks In Advance

Hi Akash,

Thanks for the rapid reply.

In that case, is there a method to replace the start frame using slicer that you know of?

Thanks

Jay

Anonymous
Not applicable

Hi @JayWee,

Thank you for reaching out in Microsoft Community Forum.

Thank you @Akash_Varuna  for the helpful response.

Please follow below steps to replace the start frame using slicer;

1.Vega-Lite's frame property only accepts static numeric values (e.g., [-1, 1]) — it cannot use dynamic expressions like parseInt(datum.X) or respond to slicers.

2.Slicers in Power BI cannot dynamically control frame in a Vega-Lite spec — it’s not interactive in that way.

3.To achieve dynamic behavior, perform the calculation in DAX or Power Query and pass the result to Vega-Lite.

4.Alternatively, use native Power BI visuals for dynamic rolling windows or frame-based calculations.

Please continue using Microsoft Community Forum.

If this post helps in resolve your issue, kindly consider marking it as "Accept as Solution" and give it a 'Kudos' to help others find it more easily.

Regards,
Pavan.

Thanks Pavan.

 

I've just started using Power BI and Deneb, so still trying to work out how stuff works.

Will give the DAX calculation a go and figure out how to incorporate into Deneb.

 

Thanks both for the advice.

 

Jay

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.