i have a monthly filter for the table view for which "require single selection" is enabled. The values in it are in the format "Month Year" (january 2021, february 2021 etc). So is there any option by which the filter defaults to the current month (ie june 2021 fr now) according to the prese date
Solved! Go to Solution.
I think you want to filter your visual to the current month when there is no selection in your “Month Year” filter.
You can try to build a filter measure to achieve your goal.
Filter Measure = VAR _CurMonthYear = FORMAT ( TODAY (), "MMMM" ) & " " & YEAR ( TODAY () ) VAR _RESULT = IF ( ISFILTERED ( 'Sample'[Month Year] ), 1, IF ( MAX ( 'Sample'[Month Year] ) = _CurMonthYear, 1, 0 ) ) RETURN _RESULT
Add this measure into visual filter field and set it to show items if the value equal to 1. We can see that our visual will only show values whose "Month Year" = June 2021 by default.
If we filter in "Month Year",result is as below.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you use relative date, you will not be able to change the date to any other. You can try the Reative date as follows and see if it works for your scenario as follows. You need to do it on a Date Field.
There is an idea for you to vote: https://ideas.powerbi.com/ideas/idea/?ideaid=39ba67cf-724e-4b6c-9906-51163749f759
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.
130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.