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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to use set analysis in above case

Dear all

I have a scenario that I want to use Set Analysis in the calculation of last financial year sale for this I am writing

=sum({1<finYear={"$(vLstFinYear")}>} saleValue)

and It is working fine, but as soon as I change filter or filter from multi box then this Last financial year sale value not change it is remain same as previously

so, I want to calculate Last financial year sale value but with all current filter except financial year filter.

means when I change filter for Party or Product Category or Quarter then my SET Analysis should calculate last financial year sale value accordingly.

Please suggest.

Thanks & Regards.

anil

12 Replies
pover
Partner - Master
Partner - Master

Anil,

Use "$" instead of "1"

=sum({$<finYear={"$(vLstFinYear")}>} saleValue)

Not applicable
Author

Sir,

Thanks for Very Quick Reply.

I am already using same syntax as you suggested and that is

=sum({1<finYear={"$(vLstFinYear")}>} saleValue)

my problem is when I am changing filter other then financial year this last year value remain same, It should change according filter.

say that I want to calculate the product category sale of last year when I am using the filter of Financial year with product category and when I will customer filter with Financial year filter then it should calculate last year customer sale.

Regards

anil

pover
Partner - Master
Partner - Master

Anil,

The syntax I sent you is not the same.  You should change the "sum({1<..." to "sum({$<..."

Karl

Not applicable
Author

again thanks for quick reply.

Sir, sorry but I cant understand what you are saying, can you please explain it.

anil

pover
Partner - Master
Partner - Master

Anil,

You should not have a 1 in your expression since that means to ignore any selections made.  If you put a $ instead of the 1 you will respect all selections made except for finYear.

The 1 I'm talking about is the 7th character in your expression reading from left to right.

Karl

johnw
Champion III
Champion III

I'm responding because Anil sent me a private message pointing me to this thread.

Anil's expression: =sum({1<finYear={"$(vLstFinYear")}>} saleValue)
Karl's expression: =sum({$<finYear={"$(vLstFinYear")}>} saleValue)

Anil, see the difference now?

Not applicable
Author

Sir Karl,

It is working fine in 1 chart, in other it it not.

I am attaching my sample, there is 3 chart, 1,2 for set analysis and 3 No. for min value of a column.

In chart No. 2 it is not working.

can you please suggest for chart no 3 expression No. 2 also.

Regards

anil

Not applicable
Author

John Sir,

Yes, I got the difference as Karl sir explain.

I test Karl sir's suggestion It is working fine but in another chart It is not. I sanded my sample to Karl sir and waiting for his reply

Sorry for that private massage and thanks a lot for your response

Thanaks & Regards

anil

johnw
Champion III
Champion III

Chart 2 isn't using the finYear field.  In fact, you don't have a finYear field in your example.  I guess you mean you want to ignore "Financial Year"?  To ignore a field in set analysis, include it with an = after.  I'm unclear what you want the chart to show, but maybe you just need to add the part in red below?

sum({<"Financial Year"=,trnType={'Sales'},docDate={"<=$(vFinEndDt1)"}>} outStndAmt)