Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm new to QlikView and I need help.
I want to count some products agreeing a condition with a single quote.
Example :
"count({$ <CONTRACT={'Négociation en cours en vue d'un contrat'}> } DISTINCT PRODUCT)"
This : "count({$ <CONTRACT={'Négociation en cours en vue d'& chr(39) &'un contrat'}> } DISTINCT PRODUCT)" doesn't work.
Any idea ?
Thanks !
Hi,
At a first glance, what I do is to double quote the whole name:
Count({< CONTRACT = {"Négociation en cours en vue d'un contrat"} >} DISTINCT PRODUCT)
Better off if you can create a numeric key for each contract in the load script, so you will never need to use single or double quotes irrespective the value of the field, because you will always use the numeric field in the set analysis. This will perform much better, too.
Hope that helps.
BI Consultant
Hi,
At a first glance, what I do is to double quote the whole name:
Count({< CONTRACT = {"Négociation en cours en vue d'un contrat"} >} DISTINCT PRODUCT)
Better off if you can create a numeric key for each contract in the load script, so you will never need to use single or double quotes irrespective the value of the field, because you will always use the numeric field in the set analysis. This will perform much better, too.
Hope that helps.
BI Consultant
hope this
count({$ <CONTRACT={$(='Négociation en cours en vue d'& chr(39) &'un contrat')}>}PRODUCT)
or
count({$ <CONTRACT={"$(='Négociation en cours en vue d'& chr(39) &'un contrat')"}>}PRODUCT)
Thanks Miguel, this works perfectly well.
I take your advise also, I will change my datas.
Fred
Thanks Sunil. The first solution doesn't work but the second does.
Fred