Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Live chat with experts, bring your API Integration questions. June 15th, 10 AM ET. REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
alknirmal1
Partner
Partner

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
Partner
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
Partner
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