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: 
upaliwije
Creator II
Creator II

Date expression

I have 4 date fields in my data model

R_Year, R_month, To_Year,  To_Month

When the use select R_Year and R_Month  I want to calculate premium for To_Year= R_Year +1  and To_Month=R_Month where pol_type='F'

If R_Year=2013 and R_Month=1 result Should be To_Year=2014 and To_Month=1

I have written the following expression but it is not  working. Can some one please look into this and rectify me.

sum( {$<[To_YEAR] = {'$(=max([R_YEAR]+1))'},[To_MONTH]={'$(=max([R_MONTH]))'},POL_TYPE={'F'}>} [PREMIUM] )

10 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

What are the values in To_MONTH and R_MONTH field?

How you calculated these two fields? Check whether you created with same logic.