Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
OmarBenSalem
Esteemed Contributor

Re: Transform a set expression to an expression in the script

Same thing; no result yet..

Sorry to keep relying on you to correct my expression !

It's getting too complicated

Re: Transform a set expression to an expression in the script

Can you share you app, without rar-ing it

OmarBenSalem
Esteemed Contributor

Re: Transform a set expression to an expression in the script

Done (first page, last KPI (right)

Re: Transform a set expression to an expression in the script

Do you know why most of the things are not visible to me?

Capture.PNG

OmarBenSalem
Esteemed Contributor

Re: Transform a set expression to an expression in the script

Extensions:

the one on the right are buttons;

the one up left is list (you can convert it to filter object and then select a timeframe)

Re: Transform a set expression to an expression in the script

What is the field name? I don't think I can change the object type. I will recreate the filter object

OmarBenSalem
Esteemed Contributor

Re: Transform a set expression to an expression in the script

Timeframe

Re: Transform a set expression to an expression in the script

Changed your variable to this (Basically remove the double quotes around the Max(Year of date)... part)

[Calendar date]=,[Month of date]=,[Year of date]={$(=max([Year of date])-$1)}

and then this expression

Count({<$(vSetPeriodPrev), Code_Ligne={'MAR'}, Groupe_Complet_Vide = {c,C,G},

  Dossier = {"=Count({<$(vSetPeriodPrev)>}Aggr(Only({<$(vSetPeriodPrev)>} Code_Carrier&Plaque),Date_Embarquement,Plaque))=1"}>} Dossier)

OmarBenSalem
Esteemed Contributor

Re: Transform a set expression to an expression in the script

That worked like a charm but why !

I really can't figure out the use of the " " when I work with an aggr function in set analysis !

Sometimes, it only works with double quotes; especially in the case of x= {">=sthing <=sthingelse" }

In this case it works for me only if I surround it with double quotes

But it's the contrary thing in our case !

It's really confusing !!

Well, thank you very mich sunny !

Re: Transform a set expression to an expression in the script

The problem is that you have double quotes surrounding double quotes

If I expand your variable within your expression... it will look like this

Count({<$(vSetPeriodPrev), Code_Ligne={'MAR'}, Groupe_Complet_Vide = {c,C,G}, Dossier = {"=Count({<[Calendar date]=,[Month of date]=,[Year of date]={"$(=max([Year of date])-$1)"}>} Aggr(Only({<[Calendar date]=, [Month of date]=, [Year of date] = {"$(=max([Year of date])-$"}>} Code_Carrier&Plaque), Date_Embarquement,Plaque)) = 1"}>} Dossier)

Now this is confusing for QlikView to understand... you can use Escape sequences to handle this, but in your case, since you were doing a set analysis on number, removing double quotes also worked.... but if in case you cannot remove them, then you will have to either use Escape sequence or another technique to handle this

Community Browser