Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
facu97martin
Contributor
Contributor

Dimension - Last week according to a date

Hi everybody, i am starting to develop some apps in Qlik Sense Business - Cloud and i cant solve this week dimension i need

The thing is i need a dimension where the week shown starts in the current date.

For example: 

  • Max selected date: 23/09/2020 -> week shown = 17/09/2020 - 23/09/2020
  • Max selected date: 21/09/2020 -> week shown = 15/09/2020 - 21/09/2020

The thing is i need to have this as a dimension in a table where i have multiple weeks, like in the table below

temp.PNG

The dimension i am currently using is 

=Week(FechaDocumento, vDiaActual) & ': '& WeekStart(FechaDocumento, 0, vDiaActual) & ' - ' & WeekEnd(FechaDocumento, 0, vDiaActual)

Where FechaDocumento is my date field, and vDiaActual is a variable that i have set to be the max selected date (=Num(WeekDay(Max(FechaDocumento))))

And when i select diferent dates, the dimension doesn't change

 

I hope i made myself clear in this question, as it is my first one in this forum. Thanks in advance to everyone for being part of this great and supportive community

 

 

Labels (5)
2 Replies
G3S
Creator III
Creator III

facu97martin
Contributor
Contributor
Author

I'm sorry but i don't think it is. The thing is I need the week to start on different dates according to a max selected date. If max selected day is Tuesday, i want the weeks to go from Wednesday to Tuesday, and if it is Saturday, i want the week to be from Sunday to Saturday, so that i always can see the "last 7 days" according to the one i select

 

I hope i made myself clear