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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Current month default selection in Slicers

I have slicer  with showing Month name.How i can set current month name as default value while loading report?

Currently i created a column like this for default set up...

Current Month = IF(YEAR('table'[date])=YEAR(TODAY()) && MONTH('table'[date])=MONTH(TODAY()), 1, 0)
Added  Current Month as column in filter and select 1 as value in filter so that only show current month by default while loading report.Is there any other solution is there? And also i want to change selection month name as user requirement after loading the report.Any suggestion for this?
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

According to my understanding, you want to display the specific month based on the selected value in slicer,right?

You coulf create a table by entering data for slicer like this:

3.5.3.slicer.PNG

And then use SWITCH() function :

 

Current Month =
IF (
    YEAR ( MAX ( 'Table'[Date] ) ) = YEAR ( TODAY () )
        && MAX ( 'Table'[Month] ) = MONTH ( TODAY () ),
    1,
    0
)
Previous Month =
IF (
    YEAR ( MAX ( 'Table'[Date] ) ) = YEAR ( TODAY () )
        && MAX ( 'Table'[Month] )
            = MONTH ( TODAY () ) - 1,
    1,
    0
)

 

....

 

=
SWITCH (
    MAX ( 'ForSlicer'[Value] ),
    "Current Month", [Current Month],
    "Previous Month", [Previous Month],
    "Next Month", [Next Month]
)

 

After applying the [Measure] to filter pane ,and setting as "=1", the final output is shown below:

3.5.selection slicer.gif

 

Please take a look at the pbix file here.

 

Best Regards,
Eyelyn Qin
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
Anonymous
Not applicable

Hi @Anonymous ,

 

According to my understanding, you want to display the specific month based on the selected value in slicer,right?

You coulf create a table by entering data for slicer like this:

3.5.3.slicer.PNG

And then use SWITCH() function :

 

Current Month =
IF (
    YEAR ( MAX ( 'Table'[Date] ) ) = YEAR ( TODAY () )
        && MAX ( 'Table'[Month] ) = MONTH ( TODAY () ),
    1,
    0
)
Previous Month =
IF (
    YEAR ( MAX ( 'Table'[Date] ) ) = YEAR ( TODAY () )
        && MAX ( 'Table'[Month] )
            = MONTH ( TODAY () ) - 1,
    1,
    0
)

 

....

 

=
SWITCH (
    MAX ( 'ForSlicer'[Value] ),
    "Current Month", [Current Month],
    "Previous Month", [Previous Month],
    "Next Month", [Next Month]
)

 

After applying the [Measure] to filter pane ,and setting as "=1", the final output is shown below:

3.5.selection slicer.gif

 

Please take a look at the pbix file here.

 

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

jdbuchanan71
Super User
Super User

@Anonymous 

Just change your calculated column a bit like so.

Current Month =
IF (
    YEAR ( 'table'[date] ) = YEAR ( TODAY () )
        && MONTH ( 'table'[date] ) = MONTH ( TODAY () ),
    "Current Month",
    FORMAT ( 'table'[date], "mmmm" )
)

This will give you a column you can use in your slicer where you can selecte "Current Month".  As the months change and the table is refreshed the rows marked as "Current Month" will shift.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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