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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
unnijoy
Post Prodigy
Post Prodigy

Visuals based on filter

I have attriton data based on country. I have visuals whcih shows attrition %. I have a dropdown filter based on country.

 

1) Now i need all the visuals to be blank if multiple countries are selected. Visuals should show the numbers if only one country is         selected.

2) We can see that if data is not available the visuals will show (Blank). Can we make it "-" or any mesage like "Data not available".

1 ACCEPTED SOLUTION

@unnijoy ,

 

For the entire visual to be blank.

You can use the following measure.

 

Category1 =
var __selval = HASONEVALUE('TABLE'[Country])

return
//__selval
//IF(__selval,1,0)
IF (__selval,
SWITCH(
TRUE(),
[Attr%S] < [25PercentileNew] , "Top Quartile",
([Attr%S] >= [25PercentileNew]) && ([Attr%S] < [50PercentileNew]) , "25th to 50th Quartile",
([Attr%S] >= [50PercentileNew]) && ([Attr%S] < [75PercentileNew]) , "50th to 75th Quartile",
"Bottom Quartile"
)
,
BLANK()
)
 
 
1.jpg123.JPG
 
 
 
Regards,
Harsh Nathani
 
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!!
 
 

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

Try a measure like this

new Measure=

if(isfiltered(country[country]) && countx(allselected(country),country[country])=1,[measure],blank())

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
harshnathani
Community Champion
Community Champion

Hi @unnijoy ,

 

Please find .pbix attached.

 

Hope this is what you require.

 

https://drive.google.com/file/d/1lZTc-acls1PKWWpqQ2OWYp2KcQm-wqkD/view?usp=sharing

 

Regards,

Harsh Nathani

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

@unnijoy ,

 

For the entire visual to be blank.

You can use the following measure.

 

Category1 =
var __selval = HASONEVALUE('TABLE'[Country])

return
//__selval
//IF(__selval,1,0)
IF (__selval,
SWITCH(
TRUE(),
[Attr%S] < [25PercentileNew] , "Top Quartile",
([Attr%S] >= [25PercentileNew]) && ([Attr%S] < [50PercentileNew]) , "25th to 50th Quartile",
([Attr%S] >= [50PercentileNew]) && ([Attr%S] < [75PercentileNew]) , "50th to 75th Quartile",
"Bottom Quartile"
)
,
BLANK()
)
 
 
1.jpg123.JPG
 
 
 
Regards,
Harsh Nathani
 
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!!
 
 
Anonymous
Not applicable

Hi @unnijoy ,

 

1. I think you can change your slicer to single-selection only mode to solve the problem:

Visuals based on filter.PNG

 

2. Assuming you have a measure to calculate the attrition % called "attrition %" in your report.

You can try to add a new measure like:

if(isblank(attrition %),"-",attrition %)

 

Please try.

Aiolos Zhao

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

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.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.