Qlik Community

Qlik Sense on AWS & Azure

Discussion board where members can learn more about Qlik Sense deployments on Public Cloud Infrastructures such as AWS and Azure.

Not applicable

Need to get weeks from Date field

Hi Mates,

I am stuck with a issue in QLIKSENSE and your help is very much appreciated.

I have date field which is like Jan 2015, Feb 2015.....Aug 2016.

I need to extract weeks using this date, Is there any way to it?

Secondly, I need to show prior 13 weeks data from the selected month.

Thanks For Your Help,

Prasant Tata

Tags (1)
3 Replies

Re: Need to get weeks from Date field

Since you don't have a day in your date which week do you want to see? 1st week of the month, last week of the month or something else?

Not applicable

Re: Need to get weeks from Date field

Hi,

So this should be something like a drill down.

By default it should display all available months in current year. If user select "Mar 2016", Chart should display starting from 1st week of January 2016 till last week of march 2016( Say 12 Weeks).

That is what user is expecting.

Hope it is clear

Thanks,

Prasant Tata

galax_allu
Valued Contributor

Re: Need to get weeks from Date field

1)try to get Weelfiled like this

Week( Datefield) as Weekfield

Sum({$<Weekfield={">=$(=(Max(Weekfield) -13))<=$(=(Max(Weekfield)))"}>}sales )

your quote :

I have date field which is like Jan 2015, Feb 2015.....Aug 2016.

the above should be Month names ? not date fields ?

you can try below for  last 13 weeks

                      Sum({$<[MonthYear]={"$(=Date(Addweeks(Max(MonthYear), -13), 'MMM-YYYY'))"}>} sales)






Community Browser