Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Filter setting default on current week/month

Hi,

 

I have a report with a weeknumber dropdown filter from a calendar table. I would like it if the default filter would always be the current week. 

Now users need to activily change the filter each month/week while 90% of the time they are interested in the current week/month.

User should still be able to select the other weeks.

 

I was wondering if there is a possiblity to achieve this. 

I have an extended calendar table with week and month offsets. 

  • Anonymous 

    You can add a column to your date table along these lines.

    Week = 
    VAR _Today = TODAY()
    RETURN 
    IF ( YEAR ( [Date] ) = YEAR ( _Today ) &&
        WEEKNUM ( [Date] ) = WEEKNUM ( _Today ),
        "Current Week",
        ***** whatever you normally show for month/week goes here *****
    )

    Then you put that column in your slicer and select "Current Week".  As the meaning of current week changes the date table will update and your report will shift with it.

  • Anonymous's avatar
    Anonymous
    5 years ago

    Anonymous 
    You can create a weeknumber column, and then just use the TOP N filter on the visual with this weeknumber column. So the visual will displays the latest week data, and also allows you select other weeks on the slicer.

     

     

     


    Paul Zheng _ Community Support Team
    If this post helps, please Accept it as the solution to help the other members find it more quickly.

     

2 Replies

  • Anonymous 

    You can add a column to your date table along these lines.

    Week = 
    VAR _Today = TODAY()
    RETURN 
    IF ( YEAR ( [Date] ) = YEAR ( _Today ) &&
        WEEKNUM ( [Date] ) = WEEKNUM ( _Today ),
        "Current Week",
        ***** whatever you normally show for month/week goes here *****
    )

    Then you put that column in your slicer and select "Current Week".  As the meaning of current week changes the date table will update and your report will shift with it.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Anonymous 
    You can create a weeknumber column, and then just use the TOP N filter on the visual with this weeknumber column. So the visual will displays the latest week data, and also allows you select other weeks on the slicer.

     

     

     


    Paul Zheng _ Community Support Team
    If this post helps, please Accept it as the solution to help the other members find it more quickly.