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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
vinothkumar1990
Helper II
Helper II

Don't display the data in card visual when more than one filter value is selected

Hi,

 I have a client requirement. When a filter selected with more than one value then card visual should not display any data.

For example In the below model, If only one Month(i.e. January 2020) is selected then card visual should be displayed otherwise it should not display any data.

Note: All the filters should be in filter pane only.

 

Can you plese help me out?

vinothkumar1990_0-1625467804279.png

 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@vinothkumar1990 , isfiltered and hasonevalue can help

 

measure =

var _cnt = calculate(distinctcount(Table[Month year]), allselected(Table))

return

if(isfiltered (Table[Month year] ) && _cnt >1 , blank(), [measure])

 

 

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

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

View solution in original post

v-xiaotang
Community Support
Community Support

Hi @vinothkumar1990 

I create a sample, and you can try like this.

vxiaotang_1-1625727609646.png

 

Measure = 
var _count=CALCULATE(DISTINCTCOUNT(ProductDetails[brand]),ALLSELECTED(ProductDetails))
return
IF(_count<>1,BLANK(),"measure")

 

result:

vxiaotang_0-1625727431600.gif

Best Regards,

Community Support Team _ Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-xiaotang
Community Support
Community Support

Hi @vinothkumar1990 

I create a sample, and you can try like this.

vxiaotang_1-1625727609646.png

 

Measure = 
var _count=CALCULATE(DISTINCTCOUNT(ProductDetails[brand]),ALLSELECTED(ProductDetails))
return
IF(_count<>1,BLANK(),"measure")

 

result:

vxiaotang_0-1625727431600.gif

Best Regards,

Community Support Team _ Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@vinothkumar1990 , isfiltered and hasonevalue can help

 

measure =

var _cnt = calculate(distinctcount(Table[Month year]), allselected(Table))

return

if(isfiltered (Table[Month year] ) && _cnt >1 , blank(), [measure])

 

 

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

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

@amitchandak - Thanks for the help!

it worked when more than months are selected, but fails when nothing is selected or all are selected

vinothkumar1990_0-1625554965816.png

vinothkumar1990_1-1625555053988.png

vinothkumar1990_2-1625555090857.png

 

 

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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