Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set modifier field greater than field and variable

Hello,

I'm trying to compare a field on one part to a field and a variable on another part, inside a set modifier.

Business Rule: Cap<= (Rate + vShock)

The Cap and Rate are fields and the vShock is a variable.

I have tried the following syntaxes:

sum ({<Cap={"<=$(=Rate + $(vShock))"}>} Balance)

sum ({<Cap={"<=($(=Rate) + $(vShock))"}>} Balance)

sum ({<Cap={"<=$(=Rate + vShock)"}>} Balance)

[...]


I know how to use a set modifier for a variable alone, and for a field alone (dollar expansion) but I'm struggling with merging them.


Any thoughts?


Thanks

22 Replies
Anonymous
Not applicable
Author

Sorry to ask this but how can i attach a qvw to send you?

sunny_talwar

Check this

Uploading a Sample

sunny_talwar

Try this

Sum({<Deal = {"=Cap <= Rate + $(vShock)"}>} Balance)

Anonymous
Not applicable
Author

1)I'm actually changing from SUM(IF()) to set modifier to gain performance.

2)vShock is dynamic yes.

3) Cap and Rate are linked and in the same table. Rate is the interest rate on an account. Cap is the maximum interest rate on that same account

4) Although it seems very interesting, I'm not sure I fully understand the naked field concept. Is the following expression (that works) a naked field example: sum({<fiedl1={$(=field2)}>}balance)

Thank you

Anonymous
Not applicable
Author

I don't know why but I can only see the Mention and App features. The Attach is not visible.

sunny_talwar

Check the attached image and qvw

Capture.PNG

Anonymous
Not applicable
Author

Thank you Sunny it worked! Can you please explain to me what you had to put Deal?

sunny_talwar

I can, but I think HIC did a great job of explaining this here

Re: Why i am not getting same result with Above function ?

Anonymous
Not applicable
Author

No man like HIC.

Again many thanks!

Bryan

Anonymous
Not applicable
Author

Hi Sunny,

Maybe you can help me with the following. This is a continuation of yesterday's discussion.

I have 3 scenarios. 2 of them worked with the syntax you gave me

Scenario 1: Rate+Shock > Cap

Scenario 2: Rate+Shock < Floor


How do you solve it with 2 conditions

Scenario 3: Floor<Rate+Shock and Rate+Shock<Cap


I tried the below syntaxes:

Sum({<Deal = {"=Floor<(Rate + $(vShock)) Cap>(Rate + $(vShock))"}>} Balance)

Sum({<Deal = {"=Floor < Rate + $(vShock) < Cap"}>} Balance)


Finally,

Sum({<Deal = {"=Floor < Rate + $(vShock)"}, Deal = {"=Cap > Rate + $(vShock)"}>} Balance).



This last one returned a result but not the one i want as i need the set to be evaluated on the same row. A rate has one cap and one floor only


Many Thanks