Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

magdalena123
New Contributor III

Last week_in Qlik Sense

Hi,

I want to see (a KPI) value from last week, without to select last week, staying in selection from this week.

What function or if condition can I put?

I have in my sheet: years, months and dates from months.

Thank you,

Magdalena

1 Solution

Accepted Solutions
pathiqvd
Contributor III

Re: Last week_in Qlik Sense

Hi,

Try This,

Write Logic in script for year and week day

year(Datefield) as Year,

     Week(Datefield) as wkday

After Front end write this one:-

Current:- =only({<Year={"$(=MAX(Year))"},wkday={"$(=max(wkday))"}>}Value)

Prev:- =only({<Year={"$(=MAX(Year))"},wkday={"$(=max(wkday)-1)"}>}Value)

Year and wkday fields take as filter.


Regards,

25 Replies
sureshqv
Esteemed Contributor III

Re: Last week_in Qlik Sense

Hi,

Please read this thread you will get the result .Lastweek

magdalena123
New Contributor III

Re: Last week_in Qlik Sense

Hi Chanty,

Can you make to me an simple example (for Qlik Sense)?

In conversation "Lastweek" are many things that i don't understand.

Thank you,

Magdalena

brunobertels
Valued Contributor

Re: Last week_in Qlik Sense

Hi

Can you post the mesure you want in the KPI so that the community will be abble to adapt it for lastweek

Bruno

ahaahaaha
Honored Contributor

Re: Last week_in Qlik Sense

Hi Magdalena,


May be like as at attached file?

Regards,

Andrey

magdalena123
New Contributor III

Re: Last week_in Qlik Sense

Hi,

I have in my .xls: week (Date) and values (H) from every week.

I have dimension: week(date)

I want to select this week and to show in a KPI the value from last week.

Thank you!

Sorry, I don't know how to atash the app.

Magdalena

magdalena123
New Contributor III

Re: Last week_in Qlik Sense

Hi Andrey,

I don't see your attached file..

Thank you,

Magdalena

ahaahaaha
Honored Contributor

Re: Last week_in Qlik Sense

Attached the file again.

Regards,

Andrey

pathiqvd
Contributor III

Re: Last week_in Qlik Sense

Hi,

Try this will work

=sum({<Date2={">=$(=date(WeekStart(max(Date2)-7)+1,'MM/DD/YYYY')<=$(=date(WeekEnd(max(Date2)-7)+1,'MM/DD/YYYY'))"}>}value)


Regards,

magdalena123
New Contributor III

Re: Last week_in Qlik Sense

Hi Andrey,

Thank you!

And if I don't want to make the sum, I want to show only the value, what I will put in front of expression?

Thank you!

Madalena