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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

Expression with date

Dear Friends

I have following Expression which is working well.

Count({<RENEWED_PREMIUM = {'>0'}, RENEWED_DATE = {"$(=Max(TRAN_DATE))"}>} DISTINCT POLICY_NO)

but when I add the part in red   the following expression does not work

Count({<RENEWED_PREMIUM = {'>0'}, RENEWED_DATE = {"$(=Max(TRAN_DATE))"},END_DATE = {"$(=Max(TRAN_DATE)-1, 'DD-MMM-YY')"}>} DISTINCT POLICY_NO)

Pls help me

Labels (1)
9 Replies
antoniotiman
Master III
Master III

END_DATE = {"$(=Date(Max(TRAN_DATE)-1, 'DD-MMM-YY'))"}

upaliwije
Creator II
Creator II
Author

Hi Antonio

Still the result is 0

Screenshot_1.png

sunny_talwar
MVP
MVP

END_DATE is in DD-MMM-YY format?

upaliwije
Creator II
Creator II
Author

Yes Sunny

Screenshot_1.png

sunny_talwar
MVP
MVP

A single POLICY_NO can have single TRANS_DATE or multiple TRANS_DATE?

upaliwije
Creator II
Creator II
Author

Basically a single TRAN_DATE but sometimes multiple dates can occur

sunny_talwar
MVP
MVP

In you screenshot above, do you have Date(Max(TRANS_DATE), 'DD-MMM-YYYY') = '15-Aug-2017'?

upaliwije
Creator II
Creator II
Author

Yes Sunny

Screenshot_1.png

Anil_Babu_Samineni
MVP
MVP

Try to split and check where you are not getting. Like this?

Count({<RENEWED_PREMIUM = {'>0'}>} DISTINCT POLICY_NO)


Count({<RENEWED_PREMIUM = {'>0'}, RENEWED_DATE = {'$(=Max(TRAN_DATE))'}>} DISTINCT POLICY_NO)

......

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful