Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Filter but don't include the current week.

Hi,

 

My table has a date column & Week column. How do I filter the report using the report level filter to

only show data up to but not including the current week?

  • Hi Anonymous,

     

     

    Yes, you could create a calculated column with the formula below.

     

    Column =
    VAR week_ = 'Table'[week]
    VAR currentweek =
        WEEKNUM ( TODAY () )
    RETURN
        IF ( week_ < currentweek, 1, 0 )

    Then drag the calculated column to reported level filter and set like below.

     

     

    Best  Regards,

    Cherry

4 Replies

  • v-piga-msft's avatar
    v-piga-msft
    Icon for Resident Rockstar rankResident Rockstar

    Hi Anonymous,

     

    If you want to show the data before the current week by report level filter, I'm afraid that you should type the current week number manually in report level filter.

     

     

    Best Regards,

    Cherry

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi v-piga-msft,

       

      Would it be possible to create a calculated column that I could add in here?

      I have a date column that could be used. 

      A calculated column that is Current week -1 or something like this?

      • v-piga-msft's avatar
        v-piga-msft
        Icon for Resident Rockstar rankResident Rockstar

        Hi Anonymous,

         

         

        Yes, you could create a calculated column with the formula below.

         

        Column =
        VAR week_ = 'Table'[week]
        VAR currentweek =
            WEEKNUM ( TODAY () )
        RETURN
            IF ( week_ < currentweek, 1, 0 )

        Then drag the calculated column to reported level filter and set like below.

         

         

        Best  Regards,

        Cherry