Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
narband2778
Creator II
Creator II

Cannot subtract days from Week Start Date

Hello Everyone,

I am using KPI object in Qlik Sense. [Week Start Date] field is in 'DD/MM/YYYY' format. Qlik Sense Forums

i am using below expression which is working fine.

=Count({$ < [Week Start Date] = {"$(=Max([Week Start Date]))"}>}Pat_ID)

1.png

but If I subtract  7 days from max week start date, it's not working

=Count({$ < [Week Start Date] = {"$(=Date(Max([Week Start Date])-7))"}>}Pat_ID)

2.png

Where am I doing wrong??

Thanks,

Naresh

15 Replies
Thiago_Justen_

Are you able to share a mock up with us?

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
philip_doyne
Partner - Creator II
Partner - Creator II

HI Naresh

Why note use WEEKSTART(today()) ....

Philip

narband2778
Creator II
Creator II
Author

If I use the variable created by you in KPI object, it's returning Number Format of the date. Expression is returning '0'.

Still not good.

Thanks,

Naresh

Thiago_Justen_

What about this example?

Registrar NFST.gif

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
tamilarasu
Champion
Champion

Try this,

=Count({$ < [Week Start Date] = {"$(=Date(Max([Week Start Date])-7,'DD/MM/YYYY'))"}>} Pat_ID )

Capture.PNG

balabhaskarqlik

May be this:

=Count({$ < [Week Start Date] = {'$(=Date(Max([Week Start Date])-7))'}>}Pat_ID)