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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Deermeat
Resolver I
Resolver I

Making the Graph Blank when Nothing is Chosen in Slicer

Hello,

Currently, I have a line graph with multiple slicers. When nothing is selected, it shows all the the possible lines. Is it possible to make the graph blank when nothing is chosen?

This is what the graph looks like when nothing is chosen:

Untitled.png

Sample Data:

https://drive.google.com/file/d/1AoDCutbwxYayNLS0Y3LwHYa_JPCKczXD/view?usp=sharing

 

Thank you!

1 ACCEPTED SOLUTION
Deermeat
Resolver I
Resolver I

3 REPLIES 3
Deermeat
Resolver I
Resolver I

Managed to get it to work with: https://www.youtube.com/watch?v=sXn-QZqLD-8

amitchandak
Super User
Super User

@Deermeat , You can check for is filtered and do that

 

 

measure using table =

Var _1 = calculate(isfiltered(Geography), allselected())

Var _2 = calculate(isfiltered(item), allselected())

return

if(_1 || _2 , [Measure], blank() )

 

 

https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/

 

@amitchandak,

I tried creating the measure, but I'm not sure what to put as the [Measure] in the last line of code. Because I'm just putting the IssuerID into the legend of the graph to plot out the line without any measures used.

I tried using this measure, but it doesnt work:

IsFiltered = 
var _Industry = CALCULATE(ISFILTERED(Data[IndustryID]), ALLSELECTED())
var _Rating = CALCULATE(ISFILTERED(Data[RatingID]), ALLSELECTED())
return
if(_Industry || _Rating, SELECTEDVALUE(Data[IndustryID]) ,blank())

This measure display (blank) on a card when more than 1 item in chosen in the industry slicer, which wouldn't work as needed in the use case. Also, I can't fit it into the graph itself. It also doesnt take into Rating slicer, which I added as the 2nd to try.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.