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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Hide Visual

Hello All,

I have the Below Visualization, which is based on Direct Query.

Chandra_Va_0-1599758250447.png

The data is based on Slicer. If I select multivalues in the Slicer the Visualization should be Hidden else it should display.

Since the Storage Mode is Direct Query, I cannot change the data type 'Date'[TODAY] from text to Number in M/DAX to use in the below Measure.

Measure = IF(COUNTROWS ( FILTERS ( ZZ[Account] ) ) > 1, BLANK(), 'Date'[TODAY] )  --> Not allowing 

Any one has any thoughts on to include 'Date'[TODAY] in the new Measure or any other way I can acheive this scenario.

 

Regards

Chandra

1 ACCEPTED SOLUTION
v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

You can create a measure and add it to the filter on the visual.

__Filter = 
VAR x =
COUNTAX(
    ALLSELECTED(Sale),
    [Customer_ID]
)
RETURN
IF(
    x = 1,
    1, 0
)

v-lionel-msft_0-1600076095095.png

v-lionel-msft_1-1600076105675.png

 

Best regards,
Lionel Chen

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

View solution in original post

5 REPLIES 5
v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

You can create a measure and add it to the filter on the visual.

__Filter = 
VAR x =
COUNTAX(
    ALLSELECTED(Sale),
    [Customer_ID]
)
RETURN
IF(
    x = 1,
    1, 0
)

v-lionel-msft_0-1600076095095.png

v-lionel-msft_1-1600076105675.png

 

Best regards,
Lionel Chen

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

amitchandak
Super User
Super User

@Anonymous ,Based on what I got

Hide visualization means you are making content blank. Because the other option is the bookmark button. I doubt that will help in this case,

The date should have date datatype. Not sure why text. You should able to change the data type in column tools for most of the databases in direct query.

The date is DD-MM-YYYY format that needs a setting to work as date. Hope that is in place.

 

try Something like this

measure =

var _sel = countroes(allselected(Table[field]))

return

if(_sel >2, [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
Greg_Deckler
Community Champion
Community Champion

@Anonymous - Sorry, having trouble following, not sure you can hide the entire visual without using a Bookmark ?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi @Greg_Deckler ,

Apologies for the confusion.

I have a Slicer, filters on Account. If I select one Account, the Visual should Display but if Selected MultiValue in Slicer the Visual should Hide. Im trying to Acheive this requirement, unfortunately Im not able to do.

 

Regards

Chandra

@Anonymous I believe:

New Measure = IF(HASONEVALUE('Table'[Account]),[Old Measure],BLANK())


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors