Different rules in the screener depending on the calendar date

Hello everybody,

I would like to apply different price earnings ratios depending on the current date.

For example until the end of June the function FRank based on ProjPECurFY and for the second half of the year FRank function with ProjPENextFY should be put into effect.
And in case that ProjPECurFY or ProjPENextFY will come out NA due to missing analyst coverage, the applied function should respectively fall back to the latest available p/e like e.g. PEExclXorTTM.

Does anybody know, if it is possible to translate such a formula into P123 language?

Thank you very much.

Regards
Michael

Frank(“eval(Month > 6,IsNA(ProjPENextFY,PEExclXorTTM) ,ProjPECurFY)”,#all,#desc) < 50

This should work, however i did not check how N/A will be handled in this case because in terms of Frank, NA’a are always placed at the bottom of the array and all get the same percentile.

So please doublecheck if this formula generate desirable results.