Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
Showing results for 
Search instead for 
Did you mean: 

Current vs Previous term - Urgent help if possible!!


I am creating a dashboard, and one of the features I want to implement is to have a page where it shows the total GWP for the Max Policy and the previous Policy, and to have the comparison.

Sum({<PolicyEffectiveDateCh = {"$(=Max(PolicyEffectiveDateCh))"}>} GrossWrittenPremium) - I currently am using this expression which calculates what I want, but only when I select a certain Policy. When I have not made a selection, the sum is not correct.

Sum({<PolicyEffectiveDateCh = {"$(=Max(PolicyEffectiveDateCh)-1)"}>} GrossWrittenPremium) - When I try this - I wanted to select the Max Policy Effective Date -1 to select the record before the Max record, however the output comes as 0, when I select a certain policy or when I have no selections?

Once I have these calculations, I am able to do the comparison between the two. Can anyone help me do a total GWP for each Max record of PolicyNumber? and then the prior record GWP?


Labels (3)
2 Replies
Digital Support
Digital Support

Have a look at the following Design Blog posts, believe they should be helpful on this one:



Here is the base link to the Design Blog area in case you want to search further on your own:



To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
Contributor III
Contributor III


Try this

Sum({<PolicyEffectiveDateCh = {"$(=Max(PolicyEffectiveDateCh,2))"}>} GrossWrittenPremium)