Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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
25 Replies
magdalenatudose
Creator
Creator
Author

Hi,

Thank you all for you help.

The answer from helped me.. but now my question is: how could i make expression from last week independent to selection? When I select this week, to appear the both value, without select last week (I have two separate KPI)

My expressions are:

for this week: only({<IntYear={"$(=MAX(IntYear))"},wkday={"$(=max(wkday))"}>}[value])

for last week: only({<IntYear={"$(=MAX(IntYear))"},wkday={"$(=max(wkday)-1)"}>}[value])

Thank you,

Magdalena

Magdalena
antonaks
Creator II
Creator II

I use flag from calendar

pic.png

You can also add SET Analysis 'Week =' to avoid filtering this field.


sum({<PW_F={1}, Week=>} sales_2017)

sum({<CW_TD={1}, Week=>} sales_2017)

magdalenatudose
Creator
Creator
Author

Hi Anton,

Thank you for your answer, but, unfortunately I don't know how to applique in my case. I'm totally new in qlik...

Could you help me, with my expressions?

Thank you,

Magdalena

Magdalena
antonaks
Creator II
Creator II

Hi Magdalena,
Of course I can help you. Can you send me your application script? It can be in txt format.

magdalenatudose
Creator
Creator
Author

Thank you Anton, I succeded! Magdalena

Magdalena
antonaks
Creator II
Creator II

I'm glad if I helped you