Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
MAy I have your help for a simple problem I don't understand it doesn't work.
I want to use Set analysis to dosplay the value of N-1 starting for a selected date (from an island table)
Sales for year is sum(Sales)
Sales for previous year should be . sum({$<SalesYear = {$(=Only(Cal_An)-1)}>} Sales)
Cal_An is the year which result from a Cal_Date selection (01/05/2012) and gives only 1 value (2012) and it is stored in an island table detached from other tables.
Nevertheless I 've the same prblem with YTD
I would appreciate an precious help
Thanks
Chris
Hi guys,
Thnak you to everybody for having participate to solve this problem.
I finally found the right syntax
sum( {<SalesYear= {'$(=only(Cal_An))'} >} SalesUN)
Means I get all the sales YTD from january to last known month
Best regards
Christian
Selon Michael Solomovich <qliktech@sgaur.hosted.jivesoftware.com>:
the discussion
"Re: Set analysis pb"
To view the discussion, visit:
http://community.qlik.com/message/235515#235515
Try inserting $(=Only(Cal_An)-1) between ' '.
if it does not work, put each part in a text field and see the results. that will help find the problem.
I use double quotes in similar situations::
sum({$<SalesYear = {"$(=Only(Cal_An)-1)"}>} Sales)
Hi Michael
Thank you for your answer. I am trying it
Nice to hear from you again.
What are youi doing now ?
christian
Selon Michael Solomovich <qliktech@sgaur.hosted.jivesoftware.com>:
the discussion
"Re: Set analysis pb"
To view the discussion, visit:
http://community.qlik.com/message/235103#235103
What if you input a literal as year, like
=sum({$<SalesYear = {2011}>} Sales)
does this gives you a correct result?
=Only(Cal_An)-1
in a text box returns 2011?
What hasn't worked? The sum or the only? Or both?
If the sum hasn't worked and your SalesYear are really numericals like 2011, I assume you need to clear selections in other fields that are incompatible with your selection in SalesYear (e.g. do you have also selections in SalesDate or SalesMonth? Then you need to clear these fields:
=sum({$<SalesYear = {2011}, SalesDate=, SalesMonth= >} Sales)
Could you upload the file?
That would be easier to check.
Hi Christian,
I'm fine, thanks for asking.
As for the problem, I hope Stefen's answer is helpful. Still not clear if the textbox =Only(Cal_An)-1 works or not. If you can't figure out, you better upload the application.
Best Regards,
Michael