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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
data_team
Regular Visitor

How to Restrict Month Display to Current Financial Year in a Slicer Default State

I have a dataset containing financial year and month data for FY 2023-24(April till March) and FY 2024-25 (April till December). This data is connected to a financial year slicer. When I select a specific financial year (e.g., 2023-24 or 2024-25), the clustered column chart on the X-axis correctly displays only the months available for the selected financial year.

Dashboard image for reference:

 

I’ve configured the slicer to default to the current financial year (2024-25), showing months from April to December when no selection is made (i.e., when "Clear Selection" is clicked). However, I’ve encountered an issue:

When "Clear Selection" is clicked, the slicer shows "All," and the chart displays a union of months from both financial years. This results in months like January, February, and March (from FY 2023-24) being included in the chart, which is not desirable.

I want to ensure that in the default "Clear Selection" state, only months from the current financial year (2024-25) i.e April to December are shown, without including months from the previous financial year.

 

Has anyone faced a similar issue or found a way to restrict the displayed months to only those in the current financial year when the slicer is in the "All" state?

 

Any help or guidance would be greatly appreciated!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @data_team ,

 

You can try the following measure.

Measure = 
VAR selectedFY =
    CALCULATE ( SELECTEDVALUE ( 'Date'[Financial Year] ), ALLSELECTED ( 'Date' ) )
RETURN
    SWITCH (
        selectedFY,
        "FY 2023-24", IF ( MAX ( 'Date'[Financial Year] ) = "FY 2023-24", 1, 0 ),
        "FY 2024-25", IF ( MAX ( 'Date'[Financial Year] ) = "FY 2024-25", 1, 0 ),
        BLANK (), IF ( MAX ( 'Date'[Financial Year] ) = "FY 2024-25", 1, 0 )
    )


The final result is as follows. Hopefully it will meet your needs.

vdengllimsft_0-1737446497576.png

vdengllimsft_2-1737446537668.pngvdengllimsft_3-1737446563682.png


Please see the attached pbix for reference.

Best Regards,
Dengliang Li

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

6 REPLIES 6
Anonymous
Not applicable

Thanks for the reply from bhanu_gautam and danextian, please allow me to provide another insight.
Hi @data_team ,

You can use the custom visual "Preselected Slicer".
This visual allows you to set the default selection and is not affected by the Clear all slicer button.

vdengllimsft_0-1737083527187.png


The test steps are as follows.

The financial year table is as follows

vdengllimsft_1-1737083732540.png


This Preselected Slicer visual requires three fields:.
1. Fields: i.e. the fields we are going to place on this slicer.
2. Pre Selection: We can put the measure we created here to determine which data we need to pre-select by default.
3. Dirty Status: we can put a column of data that has a return value, such as TRUE() and FALSE().

First, we need to create a table with a column value of True and False as shown below.

vdengllimsft_2-1737083918631.png

Second, create a measure to define the fiscal year we need to preselect by default. If we need default preselection then we return True, otherwise we return False.

Flag = 
VAR currentDate = TODAY()
VAR currentFY = CALCULATE(MAX('Financial'[Financial Year]),'Financial'[Date] = currentDate,ALL())
RETURN
IF(SELECTEDVALUE('Financial'[Financial Year])= currentFY,TRUE(),FALSE())


Then create the Preselected Slicer visual. The current fiscal year is selected by default.
Clicking the "Clear all slicers" button does not reset the selection for this slicer.

vdengllimsft_3-1737084155192.png

 

In this way, only the months of the current financial year (2024-25) will be shown in the chart.

vdengllimsft_4-1737084689337.png


Please see the attached pbix for reference.

Best Regards,
Dengliang Li

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

danextian
Super User
Super User

Hi @data_team 

 

It is either you incorporate that as a condition in your measure or create a measures as a visual filter.

You can see in the screenshot below, that Total Revenue with Default has values only for 2024 which is the max year in the dates table when no year is selected from the slicer.

danextian_0-1737028539034.png

 In the screenshot below, Total Revenue with Default - filter is used to visually filter the second column chart..

danextian_1-1737028648158.png

Please see the attached sample pbix.

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
bhanu_gautam
Super User
Super User

@data_team , Create a DAX Measure for Current Financial Year: Create a measure that identifies whether a given month belongs to the current financial year (2024-25).

IsCurrentFY =
IF(
'Date'[FinancialYear] = "2024-25",
1,
0
)

 

elect your clustered column chart.
In the Filters pane, drag the IsCurrentFY measure to the Visual level filters area.
Set the filter to show only values where IsCurrentFY is 1.




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






This is working fine but when I select FY 2023-24, it does not show any columns.

Anonymous
Not applicable

Hi @data_team ,

 

You can try the following measure.

Measure = 
VAR selectedFY =
    CALCULATE ( SELECTEDVALUE ( 'Date'[Financial Year] ), ALLSELECTED ( 'Date' ) )
RETURN
    SWITCH (
        selectedFY,
        "FY 2023-24", IF ( MAX ( 'Date'[Financial Year] ) = "FY 2023-24", 1, 0 ),
        "FY 2024-25", IF ( MAX ( 'Date'[Financial Year] ) = "FY 2024-25", 1, 0 ),
        BLANK (), IF ( MAX ( 'Date'[Financial Year] ) = "FY 2024-25", 1, 0 )
    )


The final result is as follows. Hopefully it will meet your needs.

vdengllimsft_0-1737446497576.png

vdengllimsft_2-1737446537668.pngvdengllimsft_3-1737446563682.png


Please see the attached pbix for reference.

Best Regards,
Dengliang Li

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

Thanks a lot! This worked.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.