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
mg01
Helper I
Helper I

Month Slicer always point to Current Month

In report, I have one slicer for Invoice Month, which contains month in format yyyy/mm. Example: 2022/08

Now my requirement is that slicer always point to current month value, let say...
in August 2022 which is current month, 2022/08 must be selected
When i will navigate in Sep 2022, then 2022/09 should got selected automatically.

Is it possible to do so in power bi?

I was able to achieve this by below code:

Invoice Month =
IF (
    'Calendar'[Date] < TODAY (),
    IF (
        MONTH ( 'Calendar'[Date] ) = MONTH ( TODAY () )
            && YEAR ( 'Calendar'[Date] ) = YEAR ( TODAY () ),
        "Current Month",
        YEAR ( 'Calendar'[Date] ) & "/"
            MONTH ( 'Calendar'[Date] )
    )
)

This is approach is fine, but instead of showing text i.e. "Current Month" I want show numeric value to be automatically selected like in current month 2022/08 should be selected, when I will navigate in Sep 2022, then 2022/09 should be selected.
Please find the screenshot below:

mg01_0-1660284092653.png

Thanks,
Mohit Gupta



2 ACCEPTED SOLUTIONS
lukiz84
Memorable Member
Memorable Member

Hi, that's not possible "by default". But there's a little workaround:

Set Default Slicer Selection to Current Year or Month in Power BI - YouTube

View solution in original post

v-rzhou-msft
Community Support
Community Support

Hi @mg01 ,

 

As far as I know, Power BI doesn't support us to set a default selection in slicer. I think add a selection "Current Month" should be a good workaround.

Your demand is a good idea, while it is not supported to implement in Power BI currently.
You can vote up this idea for this function : Select Default in the Date Slicers
Or you can submit a new idea to improve the Power BI.
It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.

 

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.

 

View solution in original post

2 REPLIES 2
v-rzhou-msft
Community Support
Community Support

Hi @mg01 ,

 

As far as I know, Power BI doesn't support us to set a default selection in slicer. I think add a selection "Current Month" should be a good workaround.

Your demand is a good idea, while it is not supported to implement in Power BI currently.
You can vote up this idea for this function : Select Default in the Date Slicers
Or you can submit a new idea to improve the Power BI.
It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.

 

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.

 

lukiz84
Memorable Member
Memorable Member

Hi, that's not possible "by default". But there's a little workaround:

Set Default Slicer Selection to Current Year or Month in Power BI - YouTube

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.