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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Blank deneb visual until slicer selected

Is it possible to set up a Deneb visual to be blank until a slicer is selected?

 

I have a measure that looks like this (is blank until a Country is selected in the slicer):

EventCountrySelected =
VAR CountrySliced2 =
CALCULATE(
    ISFILTERED('EVENTS TEST'[Country]),
    ALLSELECTED('EVENTS TEST'[Country])
)
RETURN
if(
    CountrySliced2,
    sum('EVENTS TEST'[Score_2]),
    BLANK()
)
 
It works just fine in a regular line graph in Power BI. My line graph is blank until I select a country from the slicer.
 
However, I'd like to use a Deneb custom visual I created (also a multi-line graph) as it is more layered/dynamic. It works as it should when I use my "Country" field. So, I tried replacing my "Country" field in deneb with the above measure, and I get a blank graph:
 
veronica_zappp_0-1669732253756.png

 

and when I selected a country in the slicer, it does update, but still doesn't show the country I selected:

 

veronica_zappp_1-1669732374803.png

 

Any tips on how to set the deneb visual to be blank until a country is selected? I double checked my code (see below), the new countryblank measure is all there in vega-lite. I tried using a card that becomes transparent when a slicer is selected but realized that won't work for me because the point of the deneb visual is to be interactive (vertical line on mouseover) and the card prevents me from using mouseover.

 

{
"data": {"name": "dataset"},
"width": 600,
"height": 500,
"layer": [
{
"encoding": {
"x": {"field": "Year_formatted", "type": "temporal", "title": "Years (YYYY)"},
"y": {"field": "Index Score", "type": "quantitative", "title": "Score"},
"color": {"field": "EventCountrySelected", "type": "nominal", "legend": null}
},
"layer": [
{"mark": "line"},
{
"params": [{
"name": "label",
"select": {
"type": "point",
"encodings": ["x"],
"nearest": true,
"on": "mouseover"
}
}],
"mark": "point",
"encoding": {
"opacity": {
"condition": {
"param": "label",
"empty": false,
"value": 1
},
"value": 0
}
}
}
]
},
{
"transform": [{"filter": {"param": "label", "empty": false}}],
"layer": [
{
"mark": {"type": "rule", "color": "gray"},
"encoding": {
"x": {"type": "temporal", "field": "Year_formatted", "aggregate": "min"}
}
},
{
"encoding": {
"text": {"type": "quantitative", "field": "Index Score"},
"x": {"type": "temporal", "field": "Year_formatted"},
"y": {"type": "quantitative", "field": "Index Score"}
},
"layer": [
{
"mark": {
"type": "text",
"stroke": "white",
"strokeWidth": 2,
"align": "left",
"dx": 5,
"dy": -5
}
},
{
"mark": {"type": "text", "align": "left", "dx": 5, "dy": -5},
"encoding": {
"color": {"type": "nominal", "field": "EventCountrySelected"}
}
}
]
}
]
},
{
"mark": {"type": "text", "align": "center", "fontWeight": "bold", "fontSize": 10, "dy": 15},
"encoding": {
"x": {
"field": "Year_formatted",
"type": "temporal"
},
"y": {
"field": "Index Score",
"type": "quantitative"
},
"text": {"field": "Event Name", "type": "nominal"},
"color": {"value": "black"}
}}
]
}

 

Thanks for the wisdom.

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

Please refer to these similar threads, hope these are helpful.
Solved: Visualisations blank until something selected in a...
Solved: Visual blank until filter selected
powerbi - Hide a visual until slicers are selected in power BI

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

Anonymous
Not applicable

Sorry, this did not help.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors
Top Kudoed Authors