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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply

Custom date filter

can we edit date filter manually in power bi or is there any visual so we can add year month and date manually. in slicer date filter i am not able to edit on after add report on to the server

rock_stage_user_0-1668593244663.png

 

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @rock_stage_user ,

 

You can try formula like below:

Filtered Value = 
SWITCH (
    SELECTEDVALUE ( 'Table'[Custom_Filter] ),
    "Last Year",
        CALCULATE (
            SUM ( 'Table (2)'[Value] ),
            FILTER (
                'Table (2)',
                MAX ( 'Table (2)'[Date].[Year] )
                    = ( YEAR ( TODAY () ) - 1 )
            )
        ),
    "This Year",
        CALCULATE (
            SUM ( 'Table (2)'[Value] ),
            FILTER ( 'Table (2)', MAX ( 'Table (2)'[Date].[Year] ) = ( YEAR ( TODAY () ) ) )
        ),
    "Next Year",
        CALCULATE (
            SUM ( 'Table (2)'[Value] ),
            FILTER (
                'Table (2)',
                MAX ( 'Table (2)'[Date].[Year] )
                    = ( YEAR ( TODAY () ) + 1 )
            )
        )
)

 

vhenrykmstf_1-1669370296128.png

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

3 REPLIES 3
v-henryk-mstf
Community Support
Community Support

Hi @rock_stage_user ,

 

You can try formula like below:

Filtered Value = 
SWITCH (
    SELECTEDVALUE ( 'Table'[Custom_Filter] ),
    "Last Year",
        CALCULATE (
            SUM ( 'Table (2)'[Value] ),
            FILTER (
                'Table (2)',
                MAX ( 'Table (2)'[Date].[Year] )
                    = ( YEAR ( TODAY () ) - 1 )
            )
        ),
    "This Year",
        CALCULATE (
            SUM ( 'Table (2)'[Value] ),
            FILTER ( 'Table (2)', MAX ( 'Table (2)'[Date].[Year] ) = ( YEAR ( TODAY () ) ) )
        ),
    "Next Year",
        CALCULATE (
            SUM ( 'Table (2)'[Value] ),
            FILTER (
                'Table (2)',
                MAX ( 'Table (2)'[Date].[Year] )
                    = ( YEAR ( TODAY () ) + 1 )
            )
        )
)

 

vhenrykmstf_1-1669370296128.png

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

johnt75
Super User
Super User

Set up a date table, marked as a date table, and you can then use the Year, Month, Day etc columns from the date table in separate slicers.

in that case user will need to click multiple times need to edit in this filter only

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.