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
4jhill
Frequent Visitor

Help: Hide visual based on the end date selected from Date slicer

Aim: create a measure that is applied as a filter to a donut chart visual so when a user selected a date after 16/06/2024, the visual is hidden.

 

I created a measure to add as a filter to the visual. (The measure is sitting under my calendar dim table)

4jhill_0-1733095834781.png

Under the filter panel I selected "show items when the value" "is" "0'' 

4jhill_1-1733095979827.png

4jhill_2-1733096095723.png

 

However, nothing happens to the visual when I select a date after 16/06/2024 from the date slicer. 

 

Any suggestions would be appreciated.

 

For privacy reasons I cannot share the PowerBi report.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @4jhill ,

 

In Power BI, it is not possible to dynamically hide a visual directly. However, you can control the content of the visual by filtering its data source, making it display "No data." In your case, it is recommended to create a measure for the data table associated with the visual and use this measure to filter the visual.

 

Measure = IF(MIN('Calendar d'[Date])>DATE(2024,6,16)||MAX('Calendar d'[Date])>DATE(2024,6,16) ,1,0)

 

Best Regards,

Bof

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @4jhill ,

 

First, the settings in the Filter pane do not directly control whether a visual is displayed or not. Their primary function is to filter the data within the visual.

 

Second, the parameters in your DATE function are incorrect. The correct format should be DATE(Year, Month, Day). If your true intention is to filter the data, then the final formula can be revised as follows:

Measure = IF(SELECTEDVALUE('Calendar d'[Date]) > DATE(2024, 6, 16), 1, 0)

 

Best Regards,

Bof 

Hi Bof,

 

Thanks for that. Would you have any suggestions as to how best go about hiding a visual if a date selected on the date slicer is after 16th June 2024?

 

Cheers!

Anonymous
Not applicable

Hi @4jhill ,

 

In Power BI, it is not possible to dynamically hide a visual directly. However, you can control the content of the visual by filtering its data source, making it display "No data." In your case, it is recommended to create a measure for the data table associated with the visual and use this measure to filter the visual.

 

Measure = IF(MIN('Calendar d'[Date])>DATE(2024,6,16)||MAX('Calendar d'[Date])>DATE(2024,6,16) ,1,0)

 

Best Regards,

Bof

 

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.

Top Kudoed Authors