Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
I want to write the below condition in Qliksense Load script, Could you please check and advice -
IF AVG([EQ Trade Entry Comparison])>3 and AVG([CTMP Entry To Match Agreed])<12 then "Part A Late"
ELSEIF AVG([EQ Trade Entry Comparison])<5 and AVG([CTMP Entry To Match Agreed])>.5 then "Party B Late"
Thanks,
Richard
Wherever you are writing this condition make sure to include group by statement like below
LOAD Field1,
Field2,
IF (AVG([EQ Trade Entry Comparison])>3 and AVG([CTMP Entry To Match Agreed])<12,'Part A Late',
IF(AVG([EQ Trade Entry Comparison])<5 and AVG([CTMP Entry To Match Agreed])>.5,"Party B Late")) as [Late Status]
FROM/resident Source
GROUP BY Field1,Field2;
try below
IF (AVG([EQ Trade Entry Comparison])>3 and AVG([CTMP Entry To Match Agreed])<12,'Part A Late',
IF(AVG([EQ Trade Entry Comparison])<5 and AVG([CTMP Entry To Match Agreed])>.5,"Party B Late"))
Regards,
Hi Prashanth,
Thank you for your response.
Getting error in Data load saying invalid expression.
IF (AVG([EQ Trade Entry Comparison])>3 and AVG([CTMP Entry To Match Agreed])<12,'Part A Late',
IF(AVG([EQ Trade Entry Comparison])<5 and AVG([CTMP Entry To Match Agreed])>.5,"Party B Late")) as [Late Status]
not sure wat i am missing here.
Are you grouping the Avg() by certain fields? If you are, then you will need a group by statement
Yes Sunny, i was group these conditions into a column which i want to use in pivot.
Could you please help me out.
Regards,
Richard
Can you show the script you are using to load the this table with group by?
Apologies Sunny its a big script and cannot share here.
But i can explain you what i am looking for -
I have these columns
EQ Trade Entry Comparison]
[CTMP Entry To Match Agreed] which gets values (1-10) based upon Party A or B touch
so i was looking if i can implement some logic based on average values and name it as separate Column to categories where it was Party A late or Party B late.
Appreciate your time and support.
In simple terms -
(IF average of [EQ Trade Entry Comparison] >3 and average of [CTMP Entry To Match Agreed]<12,'Party A Late '
IF average of [EQ Trade Entry Comparison] <5 and Average of [CTMP Entry To Match Agreed]<0.5,'Party B Late ')
as [Late Status]
Regards,
Richard
I am not looking for the complete script, just the part where you load this table with the group by.
Wherever you are writing this condition make sure to include group by statement like below
LOAD Field1,
Field2,
IF (AVG([EQ Trade Entry Comparison])>3 and AVG([CTMP Entry To Match Agreed])<12,'Part A Late',
IF(AVG([EQ Trade Entry Comparison])<5 and AVG([CTMP Entry To Match Agreed])>.5,"Party B Late")) as [Late Status]
FROM/resident Source
GROUP BY Field1,Field2;
Thanks Kush, for your explanation and help. It works fine.
Regards,
Richard