can fhist be used within frank or fmedian?

I tried to use the following as a ranking node and it failed:

abs(frank(“empl/fhist(“empl”,52)”,#industry,#desc)-50)

So I tried this workaround:

abs(empl/fhist(“empl”,52)-fmedian(“empl/fhist(“empl”,52)”))

That didn’t work either.

Is it impossible to use fhist within frank or fmedian?

If so, can anyone suggest a different workaround? I want to try to rank companies on how close their employee growth is to the industry median. I have no idea if the results will be worthwhile, but I don’t know how else to try.

Thanks,

  • Yuval

Nested quote structures are not parsed correctly in the p123’s interpreter. English: quotes within quotes are not permitted.

Workaround: define your custom variables, to be embedded in the outer quote, in a previous rule using “setVar”, “showVar”, or the Custom Variables tool.

I.e., in screener:
setVar(@empl_52, fhist(“empl”,52) )

showVar(@empldelta, abs(frank(“empl/@empl_52”,#industry,#desc)-50)

in rank node:
abs(frank("empl/$empl_52,#industry,#desc)-50)

where: $empl_52 is defined as a custom variable.

Hope this helps!

Thanks! That works very well, and it’s good to have the nested quotations explanation.