Hi,
I'm working on a first time fix calculation. The function flags a case, if there is a new case for the same serial number within 7 days.
What I found out, is that the PQL window functions (such as Index_Order / Lead / Lag) are not taken into account any filters (even not on analyis level in the 'Load Script' area) or Selections. This is quite disturbing, since we use some filters to simplify the data set.
A workaround that I applied, is to include the filters also in the First Time Fix formula, but this is not preferably, since we have to state them twice, which could lead to mismatching when applying changes in the future (Load script section doesn't accept variables).
Is there a way to let window functions incorporate already present filters in the analysis?
Next to that, the behavior is quite unclear since the index is based on data that is not shown in the analysis when a 'Load Script' analyis filter is applied. Even if that is the intended behavior, it is not described in the documentation.
Kind regards,
Jan-peter
image 1: OLAP table with cases and the two indexes (v1 is without filter in code, v2 is with filter). Here it is visible that indexes are skipped when filters are applied.
image 2: Code of the Index v2 formula. The marked-out area is the same as stated in the analysis filter.