Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
schumi1980
Contributor III
Contributor III

Between dates

Dear All

I am trying to calculate the premium for the policies expiring between 01.01.2018 and 31.01.2018.

I have entered into my formula:

sum({$<ExpiryDate={'<=$(=01.01.2018)>=$(=30.03.2018)'},[Quote Status]={'Renewal'}>}NetWrtPrem*NWP_FX)

but it gives me wrong outcomes.

Can somebody tell me how to correct his formula?

Many thanks.

Best regards,

Jan

1 Solution

Accepted Solutions
YoussefBelloum
Champion
Champion

Hi,

try this:

sum({$<ExpiryDate={"$(= '>=' & '01/01/2018' & '<=' & '31.01.2018')"},[Quote Status]={'Renewal'}>}NetWrtPrem*NWP_FX)

Make sure that your ExpiryDate field have this format: DD.MM.YYYY

View solution in original post

6 Replies
YoussefBelloum
Champion
Champion

Hi,

try this:

sum({$<ExpiryDate={"$(= '>=' & '01/01/2018' & '<=' & '31.01.2018')"},[Quote Status]={'Renewal'}>}NetWrtPrem*NWP_FX)

Make sure that your ExpiryDate field have this format: DD.MM.YYYY

sunny_talwar

May be this

Sum({$<ExpiryDate = {">=01.01.2018<=30.03.2018"},[Quote Status] = {'Renewal'}>} NetWrtPrem*NWP_FX)

YoussefBelloum
Champion
Champion

Hi stalwar1‌,

can you please tell us the main difference between these 2 working solutions ?

I use both depending on the result I have..

sunny_talwar

They are the same exact solution... you are using a dollar sign expansion... which will be evaluated to what I have ... so they are two ways of writing the same thing

YoussefBelloum
Champion
Champion

thank you

sasiparupudi1
Master III
Master III

sum({$<ExpiryDate={'>=''01.01.2018''<=''30.03.2018'''},[Quote Status]={'Renewal'}>}NetWrtPrem*NWP_FX)