Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

How do select last five weeks in matrix and display auto append

I've created column for weeks and want show only last 5 columns in matrix with auto append feature . it should add latest week in visual once data is updated

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Anonymous ,

     

    You could simply add the [date] to visual filter and set filter value as "in last 4 weeks".

     

    Best Regards,

    Jay

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Following these steps may resolve your query-

    1) Select the matrix/visualization from the canvas
    2) Go to the filters pane 
    3) Go to 'Filters on the visual' > Drag your column field and then expand it
    4) From filter type select 'Top N'
    5) Beside top enter value as 5
    6) Drag your column field again in 'By Value' and click apply filter

    This may resolve your query of showing the last five weeks and it will also do auto append to show the latest week as soon as the data is updated

  • Anonymous , check suggestion by Anonymous ,

     

    You can create a new column like this in date table, and select last 5 week and save

     

    Week Type =
    var _st = today() +-1*WEEKDAY(today() ,2)+1 -35
    var _end = today() + 7-1*WEEKDAY(today(),2)
    return
    Switch( True(),
    [Date] >= _st && [Date] <= _end ,"Last 5 week" ,
    [Week Name]
    )

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    You could simply add the [date] to visual filter and set filter value as "in last 4 weeks".

     

    Best Regards,

    Jay