Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I need to, without putting a flag in the script, subtract the number of days between a dimension field and an aggregated value of that same dimension field.
In the attached example, I'm trying to find the number of days between each sale and the very first sale the employee made. Using aggr to find the first sale for each employee works fine in the first sale column, but when I subtract, it only shows the calculated value on the same row as the initial sale. Is it possible to return the calculated value on each row in the straight table without altering the script?
You could use this as calculated dimension =TX_DATE - date(aggr(NODISTINCT MIN(TX_DATE),EMP))
But you really should use expressions. See attached qvw.
You could use this as calculated dimension =TX_DATE - date(aggr(NODISTINCT MIN(TX_DATE),EMP))
But you really should use expressions. See attached qvw.
This is exactly what I was trying to do. Thanks! I've never used NoDistinct before.