Discussion board where members can learn more about Qlik Sense App Development and Usage.
I have two sql tables, in which I am using
I am then trying to create a IF statement across the two SQL tables as a flag to see if Max Shipping_DateCheck, is more than Order_DateCheck
if(max("Order_DateCheck")>("Shipping_DateCheck"),1,0) AS CustomerFlag
keep getting error
Where am I going wrong?
Have you added a Group By Statement? Whenever you have Aggregation (Max()) you need a Group By statement:
GROUP BY AllFields;
the statement is having issues with the group by, keeps having an error with
AllFields NOT FOUND
did u try till dis code?
Hahahaha you are supposed to replace AllFields with the field names you are loading into the table. It was just a placeholder to guide you
tried to add all column names and added to try the expression ones too
e.g if ...... as "CustomerFlag"
GROUP BY Order_DateCheck, Shipping_DateCheck, CustomerID, CustomerName, ShippingID , ShipperName, CustomerFlag;
keep getting invalid expression
Hi Try this way
Load Max(Order_DateCheck) as Max
Let vDate = peek('Max',0,'Max');
if($(vDate)>("Shipping_DateCheck"),1,0) AS CustomerFlag