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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Help with expression

Hi guys,

Please can you help me put the two expressions below into one.

=sum(If(WildMatch([opp_type],'Monthly*'),opp_count))

=sum({<opp_create_year={$(vCurrentYear)}>} opp_count)

I cannot seem to figure this one out !

Thanks

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

May this is what you want:

=sum({<opp_create_year={$(vCurrentYear)}>} If(WildMatch([opp_type],'Monthly*'), opp_count))

or

=sum({<opp_create_year={$(vCurrentYear)}, opp_type={'Monthly*'}>} opp_count)

View solution in original post

4 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

=sum({<opp_create_year={$(vCurrentYear)}, opp_type = {'Monthly'}>} opp_count)


talk is cheap, supply exceeds demand
Clever_Anjos
Employee
Employee

=sum({<[opp_type]={"Monthly*"},opp_create_year={$(vCurrentYear)}>} opp_count)

Anonymous
Not applicable
Author

May this is what you want:

=sum({<opp_create_year={$(vCurrentYear)}>} If(WildMatch([opp_type],'Monthly*'), opp_count))

or

=sum({<opp_create_year={$(vCurrentYear)}, opp_type={'Monthly*'}>} opp_count)

MarcoWedel

Hi,

other solutions could be:

=Sum(If(opp_type like 'Monthly*' and opp_create_year=$(vCurrentYear), opp_count))

or

=-Sum((opp_type like 'Monthly*' and opp_create_year=$(vCurrentYear))*opp_count)

although set expressions should perform better.

QlikCommunity_Thread_165250_Pic1.JPG

QlikCommunity_Thread_165250_Pic2.JPG

hope this helps

regards

Marco