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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
DavidB023
Helper III
Helper III

Empty visual

Hi everybody !

 

I would like to make empty my visual when I don't choose a date in my slicer.

 

In fact I used :

 

 IF (
    DISTINCTCOUNT ( XXXX ) = 1;
    SUM ( XXX);
    ""
)
And it worked very well with value like figures !

However, it don't work with value like text and I am embarrassed with that ..

 

Thanks
Best regards

David

1 ACCEPTED SOLUTION
JoHo_BI
Responsive Resident
Responsive Resident

Hi @DavidB023,

 

Use the DAX function HASONEVALUE() here, an example would be: 

 

IF(HASONEVALUE(TextTable[Text]), VALUES(TextTable[Text]), "Or i'll do this..")

 

Hope this helps! 

View solution in original post

4 REPLIES 4
JoHo_BI
Responsive Resident
Responsive Resident

Hi @DavidB023,

 

Use the DAX function HASONEVALUE() here, an example would be: 

 

IF(HASONEVALUE(TextTable[Text]), VALUES(TextTable[Text]), "Or i'll do this..")

 

Hope this helps! 

@JoHo_BI


Thanks for your answer, it seems okey to work, when I selected nothing, nothing appear but now when I select a value, #,0.00 appear in place of my real value..

JoHo_BI
Responsive Resident
Responsive Resident

I can't reproduce the problem. Can you show a screenshot or share a file at all? 

@JoHo_BI


My value are dates, so I just have to modelize them as a date and it sucess !

Thanks very much


Best regards

David

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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