Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
How will i use the folllowing formula in load script?
networkdays(Avg({<StatusName={'On pilot'}>}CreatedDate),Avg({<StatusName={'Pilot Ok'}>}ceateddate))
Thanks in advance
Hi Kshitija,
Aggregate functions doesn't work in script editor . Please try to use it in calculated measure.
Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.
Rohit Kumar
I assume the CreatedDate is the correct name for 'createddate;. Remember that QV field names are case sensitive.
In s standalone load:
LOAD NetWorkDays(Avg(If(StatusName = 'On pilot', CreatedDate)) Avg(If(StatusName = 'Pilot Ok', CreatedDate))) as WorkDays
FROM ...
If you are also loading other fields, then non-aggregated fields will need to be in a Group By clause:
LOAD NetWorkDays(Avg(If(StatusName = 'On pilot', CreatedDate)) Avg(If(StatusName = 'Pilot Ok', CreatedDate))) as WorkDays,
Division,
Period,
...
FROM ...
Group By Division,
Period,
...