Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Inforce count - Insuaranc

Hello,

I am trying to calculate the inforce count using the link -  https://community.qlik.com/message/497885#497885

And I am unable to work out the set expression for LIVE, and DROPPED.

Dimensions: CalendatMonthAndYear

Expressions:

Started =count({<DateType={'Start'}>} distinct Policy)

Expired/Cancelled =count({<DateType={'End'}>} Policy)

Live =rangesum(Above(Live),Started)   -  This gives me Badfield name - Live,Started.

Dropped =rangesum(Above(Dropped),[Expired/Cancelled])

InForce =Live-Dropped


Errors:

Live =rangesum(Above(Live),Started)  

The above expression gives an error as  Badfield name - Live,Started.


similarly

Dropped =rangesum(Above(Dropped),[Expired/Cancelled])

The above expression gives an error as  badfield name - Dropped,[Expired/Cancelled].



11 Replies
Gysbert_Wassenaar

Make sure you're using the correct case sensitive field names.


talk is cheap, supply exceeds demand
dwforest
Specialist II
Specialist II

When referencing a Qlik variable to get its value you need to $ expand it.

Live =rangesum(Above($(Live)),$(Started))


Without the $() Qlik assumes a name refers to a Field in the data.

balabhaskarqlik

May be this:

Rangesum(above(count(Live),0,Started))

Rangesum(above(count(Dropped),0,[Expired/Cancelled]))

balabhaskarqlik

Rangesum(above(TOTAL SUM(Live),0,Started))

Rangesum(above(TOTAL Sum(Dropped),0,[Expired/Cancelled]))

Better post the screenshot, of Live and Dropped Fields from the script.

Anonymous
Not applicable
Author

Not working

Anonymous
Not applicable
Author

Hello,

Many thanks to everyone who looked into this.

I am adding logic in an expression, and not in the script.

you could see all of them are ZERO's under Live variable.

Could you please let me know what is that iIam doing incorrectly here.

Screenshot 2018-08-20 11.27.37.png

dwforest
Specialist II
Specialist II

Post formulas, screen of results does not help.

Are you referencing your variables with $()?

Anonymous
Not applicable
Author

My expressions are as below

Started =count({<DateType={'Start'}>} distinct Policy)

Expired/Cancelled=count({<DateType={'End'}>} Policy)

Live =rangesum(Above($(Live),$(Started))

Dropped  =rangesum(Above($(Dropped)),$[Expired/Cancelled])

Inforce =$(Live)-$(Dropped)

dwforest
Specialist II
Specialist II

Live references itself with no apparent initial value, it will be null