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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Creating Show/Hide filter for current week

Hello there,

 

I'm trying to create a filter to show or hide the current week from the visuals. It seems an easy problem but it has kept me stuck for a long time. 

Below is the graph where WK17 is the current week. The dip in the orange line is what I'm trying to provide a control to the user if they want to see that or not. 

 

just_curious_0-1682202989760.png


I would like to create a filter that can hide only the current week or turn it back on. I would appreciate any help! Thank you!

2 REPLIES 2
Anonymous
Not applicable

@amitchandak Thank you for the response. I really appreciate the insights. The only concern is it will require me to create M2 for every M1. Just wondering if you have any other option that I can put to use.

Also, it was helpful to read through the articles that you shared. Now, it is causing me another trouble.

I created X-axis parameters : Daily, Weekly, Monthly, Quarterly and Y-axis parameters : M1, M2, M3, M4, M5.

The issue is whenever the X-axis selection is changed from one value (eg: Daily) to other value (eg. Weekly), the sorting just becomes random. Can you help with fixing the sorting of X-axis (ascending) for the X-axis parameter on changing selections.

Thank you!

amitchandak
Super User
Super User

@Anonymous , Few option. You can have measure say M1 and M1 till last week and use field parameter or bookmarks to ship

 

M1 = <You measure>

 

M2=

var _dat = today() -Weekday(today(),2)  // Monday week start

return

calculate([M1], filter(Date, Date[Date]<=_dat) )

 

Power BI Field Parameters — A Quick way for Dynamic Visuals: https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9afd
Power BI Field Parameters- Measure Slicer and Axis/Dimension slicer: https://youtu.be/lqF3Wa1FllE
Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f

 

 

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.