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: 
Not applicable

num sum with mathematical signs

Hello,

I am working on the following formula

=num(sum({<SalesChannel={'Internet'},Type_Forfait={'Forfait*','Offre spé*'},Type={'Réserver logement'}>} PersonNights),'#'&chr(39)&'##0', '.', chr(39)) 


it is regarding hotel reservations. in the following formula, i am counting only Reservation from INTERNET and with the Type_forfait = Forfait, offres spé...


what if now i would to count the hotel reservations which NOT including Type_forfait = Forfait, offres spé.


i was just thinking of using <> instead of = after Type_forfait...but it is not working..


thanks for your help.

JP

5 Replies
c_gilbert
Creator II
Creator II

I think you would just put a minus symbol before the equals sign after Type_Forfait.

Not applicable
Author

=num(sum({<SalesChannel={'Internet'},Type_Forfait=-{'Forfait*','Offre spé*'},Type={'Réserver logement'}>} PersonNights),'#'&chr(39)&'##0', '.', chr(39)) 

Not applicable
Author

thanks for your comments...i did not find this solution do you know why we can not use <> different ??

Not applicable
Author

=num(sum({<SalesChannel={'Internet'},Type_Forfait-={'Forfait*','Offre spé*'},Type={'Réserver logement'}>} PersonNights),'#'&chr(39)&'##0', '.', chr(39))


Should work.


I would also have a look this thread, as it explains about the different operators you can use

Set Analysis: syntaxes, examples


Hope that helps

Joe

Not applicable
Author

thanks a lot great help