Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis Help

I am getting an error with and I am not sure what I am doing wrong. It looks right to me???? I am trying to get a loss ratio and only show the ones that are less than .52. If I take the set analysis part off and just use the sum eqution it returns what I would it expect it to.

Sum

({$<(Sum(Incurred2007) + Sum(Incurred2006) + Sum(Incurred2005) + Sum(Incurred2009)+ Sum(Incurred2008)) /

(Sum(Earned2007) + Sum(Earned2006) + Sum(Earned2005) + Sum(Earned2009) + Sum(Earned2008)) = {"<.52"}>} [Written Premium])

The error I am getting is 'Error in set modifier ad hoc expression'.





1 Solution

Accepted Solutions
Not applicable
Author

In your "set" expression, I think it's a field that is expected :


sum({$<Field={"value"}> ...


Can't you do your test in a "if" expression ?

Something like



sum(
if((Sum(Incurred2007) + Sum(Incurred2006) + Sum(Incurred2005) + Sum(Incurred2009)+ Sum(Incurred2008)) /
(Sum(Earned2007) + Sum(Earned2006) + Sum(Earned2005) + Sum(Earned2009) + Sum(Earned2008)) <.52,

[Written Premium]))





View solution in original post

2 Replies
Not applicable
Author

In your "set" expression, I think it's a field that is expected :


sum({$<Field={"value"}> ...


Can't you do your test in a "if" expression ?

Something like



sum(
if((Sum(Incurred2007) + Sum(Incurred2006) + Sum(Incurred2005) + Sum(Incurred2009)+ Sum(Incurred2008)) /
(Sum(Earned2007) + Sum(Earned2006) + Sum(Earned2005) + Sum(Earned2009) + Sum(Earned2008)) <.52,

[Written Premium]))





Not applicable
Author

Yep, I will use the If statement. I was so caught up on making the set work, I didnt even think of this. Thanks