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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
AndreasMEG
Frequent Visitor

Legend that shows all vs filterede name

Can someone help me showing all values, and one in legend at same time in Deneb? It works now like this methood, but i cant use that solution i report mode. Help me develop a filter that replace: !Turbine Filter = 'Query1'[TurbineName] IN {"Borre 4"}, so i can just pick one name instead of manually writing it.

EX.

AndreasMEG_0-1759754303117.png

Green is filtered value and the rest is same park

 

 

Deneb Visual

{ "$schema": "https://vega.github.io/schema/vega-lite/v5.json", "data": { "name": "dataset" }, "resolve": { "scale": { "color": "independent" } }, "transform": [ { "calculate": "toNumber(datum.Windspeed)", "as": "WindNum" }, { "calculate": "toNumber(datum.Production)", "as": "PowerNum" }, { "calculate": "toNumber(datum['Turbine Wind'])", "as": "TWNum" }, { "calculate": "toNumber(datum['Turbine Power'])", "as": "TPNum" } ], "layer": [ /* Baggrund: målepunkter */ { "transform": [ { "filter": "isValid(datum.PowerNum) && isFinite(datum.PowerNum)" }, { "filter": "isValid(datum.WindNum) && isFinite(datum.WindNum)" } ], "mark": { "type": "point", "filled": true, "size": 18, "opacity": 0.35 }, "encoding": { "x": { "field": "WindNum", "type": "quantitative", "title": "Vindhastighed (m/s)" }, "y": { "field": "PowerNum", "type": "quantitative", "title": "Effekt (kW)" }, "color": { "value": "#1f5ca8" }, "tooltip": [ { "field": "Model", "type": "nominal", "title": "Model" }, { "field": "WindNum", "type": "quantitative", "title": "Vind (m/s)" }, { "field": "PowerNum", "type": "quantitative", "title": "Effekt (kW)" } ] } }, /* Overlay: valgt turbine (hvis kolonnerne findes) */ { "transform": [ { "filter": "isValid(datum.TWNum) && isFinite(datum.TWNum)" }, { "filter": "isValid(datum.TPNum) && isFinite(datum.TPNum)" } ], "mark": { "type": "point", "filled": true, "size": 46, "stroke": "white", "strokeWidth": 0.8, "opacity": 0.95 }, "encoding": { "x": { "field": "TWNum", "type": "quantitative", "title": "Vindhastighed (m/s)" }, "y": { "field": "TPNum", "type": "quantitative", "title": "Effekt (kW)" }, "color": { "field": "Overlay", "type": "nominal", "legend": { "title": "", "orient": "top" }, "scale": { "range": ["#2ca02c"] } }, "tooltip": [ { "field": "Model", "type": "nominal", "title": "Model" }, { "field": "TWNum", "type": "quantitative", "title": "Vind (m/s)" }, { "field": "TPNum", "type": "quantitative", "title": "Effekt (kW)" } ] } }, /* Kurve: fra WindBinIndex/5 og Curve_kW (mean pr. vind & model) */ { "transform": [ { "filter": "isValid(datum.Curve_kW)" }, { "calculate": "toNumber(datum.WindBinIndex)/5", "as": "WindCurve" }, { "aggregate": [ { "op": "mean", "field": "Curve_kW", "as": "CurveMean" } ], "groupby": ["WindCurve", "Model"] } ], "mark": { "type": "line", "interpolate": "monotone", "strokeWidth": 2, "opacity": 0.95, "color": "#d62728" }, "encoding": { "x": { "field": "WindCurve", "type": "quantitative", "title": "Vindhastighed (m/s)" }, "y": { "field": "CurveMean", "type": "quantitative", "title": "Teknisk kurve (kW)" }, "order": { "field": "WindCurve", "type": "quantitative" }, "detail": [{ "field": "Model" }], "tooltip": [ { "field": "Model", "type": "nominal", "title": "Model" }, { "field": "WindCurve", "type": "quantitative", "title": "Vind (m/s)" }, { "field": "CurveMean", "type": "quantitative", "title": "Kurve (kW)" } ] } }, /* Usynligt lag som kun leverer Model-legend (valgfrit) */ { "mark": { "type": "point", "opacity": 0, "size": 1 }, "encoding": { "color": { "field": "Model", "type": "nominal", "title": "Model", "legend": { "orient": "right" } } } } ] }

Values:
Production
Windspeed
WindBinIndex
Curve_kW
Model
Turbine Wind
Turbine Power

!Turbine Filter = 'Query1'[TurbineName] IN {"Borre 4"}
Turbine Power =
IF ( [!Turbine Filter], 'Query1'[Production], BLANK() )
 
Turbine Wind =
IF ( [!Turbine Filter], 'Query1'[Windspeed], BLANK() )
 
1 ACCEPTED SOLUTION

I solved it via Deneb Code, by just giving the scatter plot a legend. The legend was TurbineName, and then a hide feature in the code so i could see one in the layer forward, and the others behind

View solution in original post

4 REPLIES 4
v-saisrao-msft
Community Support
Community Support

Hi @AndreasMEG,

May I know if you have reported your issue using the link provided by @collinq, and if your issue has been resolved?

 

Thank you.

I solved it via Deneb Code, by just giving the scatter plot a legend. The legend was TurbineName, and then a hide feature in the code so i could see one in the layer forward, and the others behind

Hi @AndreasMEG,

Thank you for the update and for sharing the workaround for your issue. Please accept your solution so it can be helpful to other community members.

 

Thank you.

collinq
Super User
Super User

Hi @AndreasMEG ,

This appears to be the ECharts visual by Deneb.  The support page for this visual is here:  Issues · zBritva/echarts-powerbi  I suggest that you create an issue/ticket/ post at that location and have the builder answer you in more detail than other users might be able to do.




Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!
Private message me for consulting or training needs.




Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.