Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I can't get the following expression to work, can anyone see what i am doing wrong in the red text? The expression works without the red text included.
Count({<isActive={'true'},MAX(num([Store Audit Date]))={'>=$(=num(YearMonth)) <=$(=num(MonthEnd(YearMonth)))'}, $(vSet_ExcludedTime), $(vSet_ExcludedProduct) >} _%Account)
Thanks, although i am using the field, but the field has aggregation around it as i only want to use the MAX of the field.
I think it will be easier for me to create the MAX(NUM(Date)) in the script and use the resulting field instead.
Thanks
Maybe my answer is useless, but I would use " (double quotes) instead of ' (simple quote) to close the expression
Hi, thanks for your reply, unfortunately it doesn't help 🙂 I think the quotes are correct, i am getting a syntax error from the first curly bracket...
Maybe it is because you need a field on the left of the =. I have never used an expression on the left side of the = in set analysis. I think it needs to be a field, not an expression. I am pretty sure that this expression: MAX(num([Store Audit Date])) is not valid for the left side of = in set analysis. You need a field.
I think it might be that i am using MAX within the set analysis, can anyone confirm please? and if that's the reason, does anyone know how i can use the MAX(Date) within the set analysis?
See this:
Here they say that you can not use expressions on the left side of = in set analysis. Just fields
You need to use a field at the left side of the expr like:
Count({<isActive={'true'},someField={"=$(MAX(num([Store Audit Date]))={'>=$(=num(YearMonth)) <=$(=num(MonthEnd(YearMonth)))'})"}, $(vSet_ExcludedTime), $(vSet_ExcludedProduct) >} _%Account)
Thanks, although i am using the field, but the field has aggregation around it as i only want to use the MAX of the field.
I think it will be easier for me to create the MAX(NUM(Date)) in the script and use the resulting field instead.
Thanks
Just wanted to toss in some other links that may be of some help on this one to others:
https://community.qlik.com/t5/Qlik-Design-Blog/A-Primer-on-Set-Analysis/ba-p/1468344
The latter has additional post links at the bottom of the post...
Regards,
Brett