Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Adding a Field in a Group(Cyclic) to display latest two weeks

Hi

In one of my pivot table I have a group called as Time. Which contains fields such as =Week(date),=Year(date),=WeekName(date) and =MonthName(date). With that I want to one more fields which calculates only 2 weeks of data. It should show latest 2 weeks date only.

I tried something like =Date(Max(date)-14) but it didn't work.

Can some one help me out on this please.

Thanks

Rikeb

43 Replies
Not applicable
Author

Hi Deepak

Like the way we displayed for 'Two Weeks' in the chart. I would like to add one more field in the chart which displays for the current week. Could you please help me out on that.

I am also working around on this. If you have any solution please do let me know.

deepakk
Partner - Specialist III
Partner - Specialist III

hi Attitude,

Do it in same way as we did it for two weeks... Create a variable vWeek = max(date) -7 and\

it as if(date >= '$(vWeek)' and date <= '$(vMaxDate)' ,date)

Not applicable
Author


Deepak Kurup wrote:
Do it in same way as we did it for two weeks... Create a variable vWeek = max(date) -7 and\
it as if(date >= '$(vWeek)' and date <= '$(vMaxDate)' ,date)<div></div>


Here the max(date) = 23/12/2011. If we calculate from that it will not give the current week.

So I think we need to consider SysDate instead of max(date)

i,e vWeek = today(1) -7

What do you say? Please suggest me something on that.

deepakk
Partner - Specialist III
Partner - Specialist III

hi,

It depends on the requirement . If you require as per the current date then use system date else use max date