Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Show only several last weeks

Hi everyone,

I have historical data. I created chart with cyclic group (Week and Month).

I want to create some conditions, which show all data by Month and only dynamically last 12 weeks.

Do you have any ideas?

Thanks,

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Try this syntax for set:

SUM({<oDate={"$(='>=' & date(today()-84))"}>} Value)

Regards,

Michael

View solution in original post

26 Replies
Anonymous
Not applicable
Author

how can I do sort of weeks?

I calculate week variable

WeekStart(date(oDate))& '-'  &WeekEnd(date(oDate)) as WEEK

Thanks,

Anonymous
Not applicable
Author

How can I select only last 12 weeks for example?

I found

[Sort] Numeric Value ->Descending

[Dimension Limits] -> Show only First -> my value

But it looks not naturally data decrease from left to right

Do you have other ideas?

Maybe max(week)-max(week)-12 or aggr

Thanks

Clever_Anjos
Employee
Employee

Into your expression, use a Set Analisys to filter only 12 weeks

example:

SUM({<oDate={">=$(today()-84)"}>}Value)

Anonymous
Not applicable
Author

it doesn't work.

Clever_Anjos
Employee
Employee

Could you post a qvw?

Anonymous
Not applicable
Author

Try this syntax for set:

SUM({<oDate={"$(='>=' & date(today()-84))"}>} Value)

Regards,

Michael

Not applicable
Author

Hi Vladmir,

Create a variable say Vweeks, and create a slider object from 1 to 12 ,Instead of the field name , select variables and in that list select the variable Vweeks. Go to the chart or the straight table which you want to show dynamically and in that Dimension limits ,select  Show only LARGEST , = VWEEKS  variable in values place

hope this helps

Regards,

Ramesh    

Anonymous
Not applicable
Author

Thank you for your help. it works.

I have some questions

1. if today is Friday, it starts from last 12th Friday. I need always start from Monday.

2. how can it expression in dimension?

Thanks again

Clever_Anjos
Employee
Employee

1) SUM({<oDate={"$(='>=' & weekstart(date(today()-84)))"}>} Value)

2) It´s better to have all weeks on a calendar at a script