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
kiwipeet
Advocate I
Advocate I

Hide graph when no data is selected

I have a table of data containing site locations, and a related line graph showing environmental times series data belonging to that site. When I select a row in the table, the line graph shows the related data. (perfect!)

However when no site is highlighted the graph aggregates the data and shows the sum. This is misleading and incorrect.

How do I show a blank graph when nothing is selected in the table?

1 ACCEPTED SOLUTION
Nishantjain
Continued Contributor
Continued Contributor

Have you tried using this measure

 

replace the [Your measure] in the code below with the current measure that you are using in the line graph

 

 

if(isfiltered([Site Name]),[Your measure], blank())

 

 

When you use blank(), it returns no values and should leave your graph blank

 

Hope this helps

Nishant

 

View solution in original post

3 REPLIES 3
kiwipeet
Advocate I
Advocate I

More:

I've created a measure which can detect when a row is selected:
SlicerCheck = if(calculate(distinctcount([Site Name]),allselected('TakeStatus'[Site Name]))=1,"Y","N")

But how can I filter or hide data based on this?

Nishantjain
Continued Contributor
Continued Contributor

Have you tried using this measure

 

replace the [Your measure] in the code below with the current measure that you are using in the line graph

 

 

if(isfiltered([Site Name]),[Your measure], blank())

 

 

When you use blank(), it returns no values and should leave your graph blank

 

Hope this helps

Nishant

 

Hi. Thanks for replying. I got it working... Something along the lines of what you are suggesting. Ive marked your answer as correct.

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 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.