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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

apply current month to visual filter

 

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

antobourntec_0-1623415132272.png

 

1 ACCEPTED SOLUTION

@Anonymous 

 

It is not possible yet, please click the link I shared and vote for this feature to be included 

 

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

6 REPLIES 6
v-rzhou-msft
Community Support
Community Support

Hi @Anonymous 

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.

My Sample:

1.png

Filter Measure:

 

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.

2.png

If we filter in "Month Year",result is as below.

3.png

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

 

Anonymous
Not applicable

hi @v-rzhou-msft  thanks fr the idea. 
But our report has future dates too !

so we cant check this condition in that measure 😞

 

Fowmy
Super User
Super User

@Anonymous 

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.

Fowmy_0-1623415666408.png
There is an idea for you to vote: https://ideas.powerbi.com/ideas/idea/?ideaid=39ba67cf-724e-4b6c-9906-51163749f759


 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

this doesnt wrk 😕
we need the current month to be selected as default and also an option for the user to view other reports by selecting a month

@Anonymous 

 

It is not possible yet, please click the link I shared and vote for this feature to be included 

 

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Dilantha
Post Patron
Post Patron

Hi 
Do you have date slicer ? 
If yes try to add relative month like below example

Dilantha_0-1623415414716.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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