Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey, so I'm new to Qlik and attempting to create a column that I just can't get working.
I need to take the average age of "Customers" but only if they are < 100, >= 0, and their name contains the letters "P", "B", or "D'.
I've of course changed some details for confidentiality, but the methodology is the same. I've also tried to use if statements and set analysis to achieve this, but was successful with neither.
So far my code is as follows, but I don't know how to combine the two expressions into one:
#Outputs the avg of all Age values that are between [0,100)
avg(if(Age<100 and Age>=0, Age))
#Outputs all Name values that contain P, B, or D
{<Name={"P*", "B*", "D*"}>} Name
If anyone knows how to combine these two expressions into one column, help would be greatly appreciated.
Thank you
Hello @gwalsh919
Something like that:
avg({<Age={">=0<100"},Name={"P*","D*","B*"}>}Age)
Regards
Hello @gwalsh919
Something like that:
avg({<Age={">=0<100"},Name={"P*","D*","B*"}>}Age)
Regards
Worked perfectly and solved my issue, thank you so much!