Forum Discussion
Anonymous
3 years agoNot applicable
Condicionales!
Hola, tengo una consulta Tengo las siguientes columnas ON HAND (Numero), ON ORDER(Numero), FECHA(Numero), SELL OUT(Numero), Semana(Numero) lo que necesito son las siguientes condiciones, Sie...
- Anonymous3 years ago
Hi Anonymous ,
Here are the steps you can follow:
1. Create calculated column.
Column = var _sum= SUMX(FILTER(ALL('Table'),'Table'[Producto]=EARLIER('Table'[Producto])&& 'Table'[Semana]>=EARLIER('Table'[Semana])-2&&'Table'[Semana]<=EARLIER('Table'[Semana])-1),[OH ORDER]) return SWITCH( TRUE(), 'Table'[OH HAND]=0 && 'Table'[OH ORDER]<>0&&'Table'[OH ORDER]=_sum / 2,"comment Transito Pastado", 'Table'[OH HAND]<>0 && 'Table'[OH ORDER]=0,"throw Ghost Stock comment", 'Table'[Producto]="Producto2"&&'Table'[OH HAND]<>0 && 'Table'[OH ORDER]<>0,"170", 'Table'[Producto]="Producto3"&&'Table'[OH HAND]<>0 && 'Table'[OH ORDER]<>0,"82")2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Anonymous
3 years agoNot applicable
Hi Anonymous ,
Here are the steps you can follow:
1. Create calculated column.
Column =
var _sum=
SUMX(FILTER(ALL('Table'),'Table'[Producto]=EARLIER('Table'[Producto])&&
'Table'[Semana]>=EARLIER('Table'[Semana])-2&&'Table'[Semana]<=EARLIER('Table'[Semana])-1),[OH ORDER])
return
SWITCH(
TRUE(),
'Table'[OH HAND]=0 && 'Table'[OH ORDER]<>0&&'Table'[OH ORDER]=_sum / 2,"comment Transito Pastado",
'Table'[OH HAND]<>0 && 'Table'[OH ORDER]=0,"throw Ghost Stock comment",
'Table'[Producto]="Producto2"&&'Table'[OH HAND]<>0 && 'Table'[OH ORDER]<>0,"170",
'Table'[Producto]="Producto3"&&'Table'[OH HAND]<>0 && 'Table'[OH ORDER]<>0,"82")
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly