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: 
sibideepak
Creator II
Creator II

Error: Error in set modifier ad hoc element list: ',' or ')' expected

Hi all,

I could not able to sort out the issue ..I want to select the Items which have more than some % which will be selected by user.

And I have two doubts following,

1. I have expression which returns error

=Sum({<Item={"=((Sum({<$(vPeriod)>}Sales)-sum({<$(vPeriod)>}Cogs))

/Sum({<$(vPeriod)>}Sales))>0.3"}>}Sales)

vPeriod = 'Date={">=$(=Num(Min({$<Year={'$(=Max(Year))'}>}Date)))<=$(=Num(Max({$<Year={'$(=Max(Year))'}>}Date)))"}'

If I give the same expression without vPeriod it works. ie)

=Sum({<Item={"=((Sum(Sales)-sum(Cogs))

/Sum(Sales))>0.3"}>}Sales)

2. '>0.3' Given here is static but I want it dynamic ,ie) I have Inline data which have different range like >30%,30-50% etc..

So I want it work accordingly to that list box.

Thanks in Advance .,

3 Replies
sibideepak
Creator II
Creator II
Author

Is there anyone to help me ??

sibideepak
Creator II
Creator II
Author

Help Needed !!

PrashantSangle

Hi,

Modify your variable

remove date from it

and in set analysis use date={"$(vPeriod)"}

Try below

vPeriod = >=$(=Num(Min({$<Year={'$(=Max(Year))'}>}Date)))<=$(=Num(Max({$<Year={'$(=Max(Year))'}>}Date)))

Set Analysis

=Sum({<Item={"=((Sum({<date={"$(vPeriod)"}>}Sales)-sum({<date={"$(vPeriod)"}>}Cogs))

/Sum({<date={"$(vPeriod)"}>}Sales))>0.3"}>}Sales)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂