Forum Discussion

AileenIsagani's avatar
AileenIsagani
Regular Visitor
2 years ago
Solved

Date Filter

 My report deals with 3 months before and 3 months after with no specific date to make the report automatic. Is there a date filter for that. as relative filter only consist of is in the next, in the last and in this.

  • AileenIsagani , Create a column in date table and use it in slicer of page level filter

     

    if([Date]>= eomonth(today(),-4)+1 && [Date]<= eomonth(today(),3),"Three in Past and three next", "Other months")

     

    You can try "preselected slicer" custom slicer, that will allow measure to default the value

2 Replies

  • AileenIsagani , Create a column in date table and use it in slicer of page level filter

     

    if([Date]>= eomonth(today(),-4)+1 && [Date]<= eomonth(today(),3),"Three in Past and three next", "Other months")

     

    You can try "preselected slicer" custom slicer, that will allow measure to default the value

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi AileenIsagani ,

    If I understand correctly, the issue is that you want to filter the date. Please try the following methods and check if can solve your problem:

    1.Create a new measure. Enter the following DAX formula.

    Date Filter = 
    VAR Today = TODAY()
    VAR ThreeMonthsBefore = EOMONTH(Today, -3) + 1
    VAR ThreeMonthsAfter = EOMONTH(Today, 3) + 1
    RETURN
        FILTER('Table', 'Table'[Date] >= ThreeMonthsBefore && 'Table'[Date] <= ThreeMonthsAfter)

    2.Drag the measure into the filters.

     

    If the above ones can’t help you get it working, could you please provide more raw data(exclude sensitive data) with Text format to make a deep troubleshooting? It would be helpful to find out the solution.

     

    Looking forward to your reply.

    Best Regards,

    Wisdom Wu