Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Automate Weekly Update

Hello,

 

I have a table that filters out upcoming deadlines according to week. There is the text table containing the deadlines and descriptions and the the week gets updated in the filter pane. 

 

The filter pane is based on a calculated measure of the week number for the that deadline. Every week, I change the number to match the current week so that only the relevant deadlines appear. Is there a calculated measure I can create so that I would not have to go into the filter pane to increase the number by 1 each week?

 

 

 


 

 

  • Obligatory warning: it will break when you cross year boundaries.  You will also need to define what you mean by "week"  (ideally by providing a precompiled calendar table).

     

    Here's the general pattern:

    - create a string representation of your date column, replace the latest date with a string "Latest"
    - sort that new column by the original date column
    - add a slicer or visual/page/report level filter
    - set the filter to "Latest"
    - publish the pbix to the workspace/app

3 Replies

  • Obligatory warning: it will break when you cross year boundaries.  You will also need to define what you mean by "week"  (ideally by providing a precompiled calendar table).

     

    Here's the general pattern:

    - create a string representation of your date column, replace the latest date with a string "Latest"
    - sort that new column by the original date column
    - add a slicer or visual/page/report level filter
    - set the filter to "Latest"
    - publish the pbix to the workspace/app

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello,

      Thank you for the reply. I have a predefined calendar table. I have a few questions:

       

      -Should the string representation be in the calendar table or the table with the data?

      -With the 'Latest' string, how does that update automatically?

      • lbendlin's avatar
        lbendlin
        Icon for Super User rankSuper User

        It assumes that the calendar table is in Import Mode, and is refreshed frequently (daily)