Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Remove current month from MTD

Hi how to remove current month from MTD filter list?

example: current month Feb 2021, in MTD filter list keep the last month is Jan 2021,

 

  • Anonymous , Create a column like this and use that as a visual level filter

    Month Type = Switch( True(),
    eomonth([Date],0) <= eomonth(Today(),-1), 1,0
    )

     

    filter for 1

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous 

    You can try my way to build a measure filter as well.

    My Sample:

    MTD and YearMonth are calculated columns. I build YearMonth column to sort MTD column.

    Measure:

    MTD Filter =
    VAR _YearMonth =
        YEAR ( TODAY () ) * 100
            + MONTH ( TODAY () )
    RETURN
        IF ( MAX ( 'Table'[YearMonth] ) < _YearMonth, 1, 0 )

    Add this measure into Slicer's visual filter: 

    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. 

2 Replies

  • Anonymous , Create a column like this and use that as a visual level filter

    Month Type = Switch( True(),
    eomonth([Date],0) <= eomonth(Today(),-1), 1,0
    )

     

    filter for 1

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous 

    You can try my way to build a measure filter as well.

    My Sample:

    MTD and YearMonth are calculated columns. I build YearMonth column to sort MTD column.

    Measure:

    MTD Filter =
    VAR _YearMonth =
        YEAR ( TODAY () ) * 100
            + MONTH ( TODAY () )
    RETURN
        IF ( MAX ( 'Table'[YearMonth] ) < _YearMonth, 1, 0 )

    Add this measure into Slicer's visual filter: 

    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.