Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
krishna20
Specialist II
Specialist II

Set Analysis

Hi friends,

i need to get Earned Premium of year wise.my requirement is

IF(TP_POL_TO_DT>vCurrentYear)=(sum((TP_PREM_LC_1-TP_DISC_LC_1)+(TP_LOAD_LC_1)-(TP_BRK_COMM_LC_1-TP_INW_COMM_LC_1))/(TP_POL_TO_DT-TP_POL_FM_DT))*(vCurrentYear-TP_POL_FM_DT))

else

Earned Premium=Premium.

Please convert the above expression to set analysis.

Please check my expression is there any wrong in this applying set analysis because i'm not getting any data.

=sum({$<year={"TP_POL_TO_DT>vCurrentYear"}>}(sum((TP_PREM_LC_1-TP_DISC_LC_1)+(TP_LOAD_LC_1)-(TP_BRK_COMM_LC_1-TP_INW_COMM_LC_1)) /(TP_POL_TO_DT-TP_POL_FM_DT))*(vCurrentYear-TP_POL_FM_DT))

=if((TP_POL_TO_DT>vCurrentYear),(sum((TP_PREM_LC_1-TP_DISC_LC_1)+(TP_LOAD_LC_1)-(TP_BRK_COMM_LC_1-TP_INW_COMM_LC_1)) /(TP_POL_TO_DT-TP_POL_FM_DT))*(vCurrentYear-TP_POL_FM_DT))

Regards

Krishna

6 Replies
Gysbert_Wassenaar

Try:

sum({$<year={"TP_POL_TO_DT>$(vCurrentYear)"}>}((TP_PREM_LC_1-TP_DISC_LC_1)+(TP_LOAD_LC_1)-(TP_BRK_COMM_LC_1-TP_INW_COMM_LC_1))/(TP_POL_TO_DT-TP_POL_FM_DT))*(vCurrentYear-TP_POL_FM_DT)


talk is cheap, supply exceeds demand
krishna20
Specialist II
Specialist II
Author

Dear Gysbert,

Thank you for your reply.If i want to give else condition in set analysis,how can i mention?

i have calculated like this.

=if(TP_POL_TO_DT>vCurrentYear,(sum((TP_PREM_LC_1-TP_DISC_LC_1)+(TP_LOAD_LC_1-TP_BRK_COMM_LC_1-TP_INW_COMM_LC_1)))/
(
TP_POL_TO_DT-TP_POL_FM_DT)*(vCurrentYear-TP_POL_FM_DT),Sum((TP_PREM_LC_1-TP_DISC_LC_1)+TP_LOAD_LC_1))

Regards

krishna

Gysbert_Wassenaar

You cannot do branching logic in set analysis. An else condition is not possible. If you need that then you need to use and if-else statement.


talk is cheap, supply exceeds demand
krishna20
Specialist II
Specialist II
Author

Is my above expression is correct?branching of expressions.

Gysbert_Wassenaar

The branching looks ok.


talk is cheap, supply exceeds demand
krishna20
Specialist II
Specialist II
Author

Thank You..How can we assign '%' to the particular row?

Regards

Krishna