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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
suvechha_b
Creator III
Creator III

Count depending on two date fields ?

Hi All ,

Is there any way to count policy number depending on policy inception date .

My Month period is fiscal period  i.e For Month Feb , My fiscal Period is "201908" .

How can I calculate for fiscal_period "201908" the policy_number whose policy_inception_date lies for month Feb .

How can it work for all the fiscal period ?

InceptionDate.PNG

 

Thanks

1 Solution

Accepted Solutions
suvechha_b
Creator III
Creator III
Author

The solution I found -

If  POLICY_UW_MONTH_KEY  field is linked  to every month then , I used the below script and count the flag it is giving me the policies open for that month.

 

LOAD
"POLICY_UW_MONTH_KEY",
"POLICY_CURRENT_INCEPTION_DATE",
"PIN_IMPORT_DATE_BEGIN",
"PIN_IMPORT_DATE_END",
1 As FlagPolicyInception
FROM 'lib://QlikData/Model_PolicyInception.qvd' (qvd) where len(POLICY_CURRENT_INCEPTION_DATE) >0

 

Thanks

View solution in original post

3 Replies
miskinmaz
Creator III
Creator III

From script create new field of inception_date wherein it will be similar to the format of ur fiscal period. then write the set analysis like
count({<Month=("$(=max(Month))")>}distinct policy)
PrashantSangle

can you explain little bit more with sample data and expected output.
Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
suvechha_b
Creator III
Creator III
Author

The solution I found -

If  POLICY_UW_MONTH_KEY  field is linked  to every month then , I used the below script and count the flag it is giving me the policies open for that month.

 

LOAD
"POLICY_UW_MONTH_KEY",
"POLICY_CURRENT_INCEPTION_DATE",
"PIN_IMPORT_DATE_BEGIN",
"PIN_IMPORT_DATE_END",
1 As FlagPolicyInception
FROM 'lib://QlikData/Model_PolicyInception.qvd' (qvd) where len(POLICY_CURRENT_INCEPTION_DATE) >0

 

Thanks