Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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)
Under the filter panel I selected "show items when the value" "is" "0''
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.
Solved! Go to Solution.
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
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!
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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
75 | |
62 | |
51 | |
47 |
User | Count |
---|---|
213 | |
81 | |
64 | |
60 | |
56 |