Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Set Analysis

Why my below expression s not working???

Sum({<DataFlag = {'Plan'},

CalendarMonth = {"<=$(=Max(CalendarMonth))"},

CalendarMonth = {"$(=GetSelectedCount(CalendarMonth))>=1"}

>}Data)

I am getting the output 0 , even when i select the month.

Please help ............................

4 Replies
Not applicable

Set Analysis

What are you trying to achieve with this part?

CalendarMonth = {"$(=GetSelectedCount(CalendarMonth))>=1"}

If you are trying to only calculate the expression if 1 or more months are selected, then it should go in the Calculation Condition of your chart, or the Conditional box within the Expressions tab.

If you are using a version of QlikView prior to 11, then you will probably have to wrap your set expression in an If statement like this:

If(GetSelectedCount(CalendarMonth))>=1

     Sum({<DataFlag = {'Plan'},

     CalendarMonth = {"<=$(=Max(CalendarMonth))"}

     >}Data)

Not applicable

Set Analysis

Hi Michael

Thanks for your reply but i want that if conditon to be included my set expression .

Is that possible...i am using qlikview 10

MVP
MVP

Re: Set Analysis

Hi

Michael's expression should work fine in QV10 as well, as far as I can see.

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable

Set Analysis

Is there any reason that you want the condition inside the set exression?  Is it part of a more complex expression?

From my understanding of your requirement, putting an "If" around the Sum is more efficient and easier to read.

Community Browser