David B
04/16/2020, 5:34 AMGeorge McMullen
04/16/2020, 11:07 AMCOUNT({line}) / COUNT(DISTINCT {internalid})
George McMullen
04/16/2020, 11:09 AMGeorge McMullen
04/16/2020, 11:10 AMDavid B
04/16/2020, 9:05 PMCOUNT/*SQL*/(*) OVER(PARTITION BY {postingperiod}) / COUNT/*SQL*/(DISTINCT {internalid}) OVER(PARTITION BY {postingperiod})
And I have a way of detecting the first line (rather than mainline):
CASE WHEN LAG/*SQL*/({internalid}) OVER(ORDER BY {internalid}) != {internalid} THEN
[first line]
However the big gotcha is that I can't apply the "Average" summary function to this SQL code, and therefore can't make it into a custom KPI search:
https://netsuite.custhelp.com/app/answers/detail/a_id/8104George McMullen
04/16/2020, 11:42 PM