Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
ali_hijazi
Partner - Master II
Partner - Master II

Comparing columns in set analysis

Hello Qlik_ers
I was reviewing the set analysis in the help page of Qlik and I found the following:

sum({$<OrderDate = DeliveryDate>} Sales)Returns the sales for the current selection where OrderDate = DeliveryDate.

and you can find this under the following link:
https://help.qlik.com/en-US/sense/November2020/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/SetAn...

the editor give ok on the syntax
I always know that I need a key column and write instead sum({<key_column={"=OrderDate=DeliveryDate"}>}Sales)

so I tried what is written in the help link in my dashboard I have but this doesn't work at all and always returns zero

Kindly advise

I can walk on water when it freezes
5 Replies
Anil_Babu_Samineni

It is not mandatory to have Key column until unless your data literacy wrong in model. You can simplify this way

sum(If(OrderDate = DeliveryDate, Sales))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Ksrinivasan
Specialist
Specialist

hi,

yes for me also result become Zero

ksrinivasan

ali_hijazi
Partner - Master II
Partner - Master II
Author

using if else in expressions result in very slow response 
I never used if else (but rarely)

I can walk on water when it freezes
ali_hijazi
Partner - Master II
Partner - Master II
Author

so how come they put something that doesn't work?!

I can walk on water when it freezes
marcus_sommer

I think it's a mistake within the help maybe a copy & paste error from an alpha-release of the set analysis (earlier as QV 8.5) as they developed this feature. I could imagine that those syntax was functionable at this time and they decided to remove it from the final product because it could be never a pure set analysis. This means both mentioned approaches:

{$<OrderDate = DeliveryDate>} and {"=OrderDate=DeliveryDate"}

aren't a real set analysis else an if-loop in the syntax of a set analysis and mainly the same like: 

if(OrderDate=DeliveryDate, sum(Anything))

- Marcus