Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Nro Orden | Posicion | Nro Entrega | Flag Entrega | Flag Final por pedido |
---|---|---|---|---|
999999 | 1 | - | 0 | 2 |
999999 | 2 | - | 0 | 2 |
999999 | 3 | - | 0 | 2 |
999999 | 4 | 112 | 1 | 2 |
999999 | 5 | 111 | 1 | 2 |
999998 | 1 | - | 0 | 0 |
999998 | 2 | - | 0 | 0 |
999998 | 3 | - | 0 | 0 |
999997 | 1 | - | 0 | 1 |
999997 | 2 | 222 | 1 | 1 |
Hola Matias,
Si te entiendo bien lo que quieres es replicar el columna 'flag final por pedido', pero con set analysis. Mi solucion no es muy bonita pero creo que fonciona. El siguiente set te genera el count de entregas por orden:
aggr(NODISTINCT count({<[Nro Entrega]={'>0'}>}[Nro Entrega]),[Nro Orden])
A eso lo pongo dentro de un 'if(isnull' para generar un 0 en casos que no habia una entrega:
if(IsNull(aggr(NODISTINCT count({<[Nro Entrega]={'>0'}>}[Nro Entrega]),[Nro Orden])),0,aggr(NODISTINCT count({<[Nro Entrega]={'>0'}>}[Nro Entrega]),[Nro Orden]))
Te adjunto el ejemplo.
Matt
Hola Matias,
Si te entiendo bien lo que quieres es replicar el columna 'flag final por pedido', pero con set analysis. Mi solucion no es muy bonita pero creo que fonciona. El siguiente set te genera el count de entregas por orden:
aggr(NODISTINCT count({<[Nro Entrega]={'>0'}>}[Nro Entrega]),[Nro Orden])
A eso lo pongo dentro de un 'if(isnull' para generar un 0 en casos que no habia una entrega:
if(IsNull(aggr(NODISTINCT count({<[Nro Entrega]={'>0'}>}[Nro Entrega]),[Nro Orden])),0,aggr(NODISTINCT count({<[Nro Entrega]={'>0'}>}[Nro Entrega]),[Nro Orden]))
Te adjunto el ejemplo.
Matt
Yes sirrrrr! Yes yes yes it WORKS!!!!
You don't know how much i appreciate your help and how thankful I am!
Genius!!!! Thanks so so so much!!!!
How can i do to give you points or something?
Abrazo! El matt argentino
Glad to help out! Regarding points, you just need to mark the answer as 'correct'.
Best,
Matt
Thanks. I just got it marked as correct.
But now i have another question/problem. I can't use that flag in an expression, is that possible?
It's not recognized as a field so expressions won't work. How can i generate that and be able to use it?
Thanks again!
Hi Matias,
I'm not sure I understand the issue, can you post a sample for me to review or a screen shot that illustrates the issue?
Thanks.
Matt