Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
magdalenatudose
Creator
Creator

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

Magdalena
1 Solution

Accepted Solutions
pathiqvd
Creator III
Creator III

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,

View solution in original post

25 Replies
Chanty4u
MVP
MVP

Hi,

Please read this thread you will get the result .Lastweek

magdalenatudose
Creator
Creator
Author

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

Magdalena
brunobertels
Master
Master

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
Partner - Master
Partner - Master

Hi Magdalena,


May be like as at attached file?

Regards,

Andrey

magdalenatudose
Creator
Creator
Author

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

Magdalena
magdalenatudose
Creator
Creator
Author

Hi Andrey,

I don't see your attached file..

Thank you,

Magdalena

Magdalena
ahaahaaha
Partner - Master
Partner - Master

Attached the file again.

Regards,

Andrey

pathiqvd
Creator III
Creator III

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,

magdalenatudose
Creator
Creator
Author

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

Magdalena