Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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].
Make sure you're using the correct case sensitive field names.
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.
May be this:
Rangesum(above(count(Live),0,Started))
Rangesum(above(count(Dropped),0,[Expired/Cancelled]))
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.
Not working
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.
Post formulas, screen of results does not help.
Are you referencing your variables with $()?
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)
Live references itself with no apparent initial value, it will be null