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: 
nevilledhamsiri
Specialist
Specialist

Subtotal wont come for calculated dimension

Hi,

Appreciate if I am informed the steps to be followed, when a subtotal wont come for a calculated dimension! Please see below the data.

The total comes for last two columns are in correct.The formula used to get the subtotal of both new & renewals are too given below.

=IF(IF([Year(MakeDate('20'&(MID( POLICY_NO,5,2))))]<'2015','RENEWAL',IF([Year(MakeDate('20'&(MID( POLICY_NO,5,2))))]='2017','NEW',IF((Num(CR_MONTH)+365)-Num(RISK_MONTH)>365,'RENEWAL','NEW')))='RENEWAL',SUM(PREMIUM)*-1)

=IF(IF([Year(MakeDate('20'&(MID( POLICY_NO,5,2))))]<'2015','RENEWAL',IF([Year(MakeDate('20'&(MID( POLICY_NO,5,2))))]='2017','NEW',IF((Num(CR_MONTH)+365)-Num(RISK_MONTH)>365,'RENEWAL','NEW')))='NEW',SUM(PREMIUM)*-1)

Thanks

Neville

1 Solution

Accepted Solutions
nevilledhamsiri
Specialist
Specialist
Author

Issue solved!

Thanks Sunny,

That worked well. Thanks once again.

Neville

View solution in original post

3 Replies
sunny_talwar

Try these guys

=Sum(Aggr(

IF(IF([Year(MakeDate('20'&(MID( POLICY_NO,5,2))))]<'2015','RENEWAL',IF([Year(MakeDate('20'&(MID( POLICY_NO,5,2))))]='2017','NEW',IF((Num(CR_MONTH)+365)-Num(RISK_MONTH)>365,'RENEWAL','NEW')))='RENEWAL',SUM(PREMIUM)*-1)

, CLASS_CODE, CR_MONTH, POLICY_NO, REASON, RISK_MONTH))

=Sum(Aggr(

IF(IF([Year(MakeDate('20'&(MID( POLICY_NO,5,2))))]<'2015','RENEWAL',IF([Year(MakeDate('20'&(MID( POLICY_NO,5,2))))]='2017','NEW',IF((Num(CR_MONTH)+365)-Num(RISK_MONTH)>365,'RENEWAL','NEW')))='NEW',SUM(PREMIUM)*-1)

, CLASS_CODE, CR_MONTH, POLICY_NO, REASON, RISK_MONTH))

nevilledhamsiri
Specialist
Specialist
Author

Issue solved!

Thanks Sunny,

That worked well. Thanks once again.

Neville

sunny_talwar

Great, please close this thread by marking correct and helpful responses.

Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny