Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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))
hi,
yes for me also result become Zero
ksrinivasan
using if else in expressions result in very slow response
I never used if else (but rarely)
so how come they put something that doesn't work?!
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