Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
alknirmal1
Partner - Contributor III
Partner - Contributor III

Set Analysis Query

Hi All,

I have one set analysis expression which is given below . its working perfectly fine..

=sum({<[MONTH-NUMERIC] = P({<YEAR={$(vBusinessYear)}>}[MONTH-NUMERIC])>}[NET WRITTEN PREMIUM])

I am trying to calculate '<=' instead of '=' condition in the above expression  and I am not able to succeed.

Can somebody please help me to make the expression to calculate lessthan or equal to condition instead of just equal to ?

Thanks in advnace

Nirmal.

6 Replies
sunny_talwar

From what I understand, your expression is summing all Net Written Premium within the business year (which is set in your variable vBusinessYear) for all possible months. Do you still need less than or equal here???

alknirmal1
Partner - Contributor III
Partner - Contributor III
Author

Hi,

Thanks for your reply.

I completely understand your point.

But Actually when i select a month value from list box, the result is restricted to that month.. I am looking for the result <= in such scenario.

Regards

Nirmal.

sunny_talwar

Try this:


=Sum({<YEAR={$(vBusinessYear)}, [MONTH-NUMERIC] = {"<= $(=Max({<YEAR={$(vBusinessYear)}>}[MONTH-NUMERIC])")>}[NET WRITTEN PREMIUM])

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this expression

=Sum({<YEAR={'$(vBusinessYear)'}, [MONTH-NUMERIC] = {'<= $(=Max([MONTH-NUMERIC]))'} >}[NET WRITTEN PREMIUM])

Hope this helps you.

Regards,

Jagan.

alknirmal1
Partner - Contributor III
Partner - Contributor III
Author

Thanks to Jagan and sunindia..Both the expression are working correctly ..

sunny_talwar

Great, we are glad that we were able to help.

I suggest marking one of the answers as correct (and may be other one as helpful) to close the thread.

Best,

Sunny