Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following columns
TOTAL CARTONS Count(distinct CASE#)
TOTAL PIECES num(sum(UNITS#),'#,##0')
TARGET CARTONS sum(aggr(HOURS,USER_NAME,DATE,SUPERVISOR))*29
TARGET PIECES sum(aggr(HOURS,USER_NAME,DATE,SUPERVISOR))*74
I am trying to COUNT DISTINCT the USER_NAME for each row in the column OPERATORS AT RATE based on condition that TOTAL CARTONS >= TARGET CARTONS something like this:
aggr(count(distinct IF(TOTAL CARTONS >= TARGET CARTONS, USER_NAME), DIMENSION....)
What dimension do I use here to get the right output of OPERATORS AT RATE for each SUPERVISOR per WEEK?
Try this
Count(DISTINCT Aggr(
If(
Count(DISTINCT CASE#)/(Sum(Aggr(HOURS,USER_NAME,DATE,SUPERVISOR))*29) >= 1 or
Sum(UNITS#)/(Sum(Aggr(HOURS,USER_NAME,DATE,SUPERVISOR))*74) >= 1,
USER_NAME), SUPERVISOR, USER_NAME))
Hi Haneesh,
You can try the following:
if( TOTAL CARTONS >= TARGET CARTONS, sum(aggr(count(distinct USER_NAME),WEEK_START)) )
Hope that works,
Carlos M
Hi Carlos,
I don't get any output. I just get '-'.
May be you can use i- if(column(2)>column(4), UserName), you might not aggregation function.
Already tried this Neelam, it did not work.
Can you share a sample??
Would be useful if you share your example. Also check the field names match your data model.
Thanks,
Carlos
Hope you are using square brackets around your label names like [Total Cartons] >= [Total Targets]
did you try like below:
= IF(Count(distinct CASE#) >= sum(aggr(HOURS,USER_NAME,DATE,SUPERVISOR))*29 , USER_NAME)
Yes, I did use [ ] and also did the above earlier but it did not work.
What do you want me to exactly share? It's an official document hence cannot share the qvw