Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Buenas noches, me surge una cuestion con esta herramienta de Power Bi.
Es una tabla que muestra productos que se entregaron y que deben ser devueltas en todo caso si no se devolvio mediante un filtro ver con quien se encuentra el producto. (Como se muestra el resultado de Sofia)
Ejemplo:
En el caso de Ana Maria quedaria saldado ya que se le entrego el 27/01 y devolvió el 31/01. Pero en el caso de Sofia se le entregó el 31/01 y devolvió el MISMO DIA, luego mas tarde (el mismo día) se volvio a entregar el mismo producto pero no devolvio por lo cual quedaria como producto pendiente a devolver.
Hi @Manuu_108 ,
Here are the steps you can follow:
1. Go to Power Query – select the yellow marker for [Nombre] – Sort Ascending. .
2. Add Column – Index Column – From 1.
Result:
3. Create calculated column.
Flag =
var _max=
MAXX(FILTER(ALL('Table'),
'Table'[Nombre]=EARLIER('Table'[Nombre])),[Index])
var _en=
COUNTX(FILTER(ALL('Table'),'Table'[Nombre]=EARLIER('Table'[Nombre])&&'Table'[Index]<=_max),[Product Entregado])
var _de=
MAXX(FILTER(ALL('Table'),
[Index]=_max),[Producto devuelto])
VAR _MAXEN=
MAXX(FILTER(ALL('Table'),
[Index]=_max),[Product Entregado])
return
IF(
_en<>BLANK()&&_de<>BLANK(),
[Nombre] &" "&"it would be settled"
,
[Nombre] &" "&"QUDEA PENDIENTE DE DEVOLUCION DEL PRODUCTO" &" "&_MAXEN
)
4. 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
Esta es la tabla correcta y como deberia quedar la tabla
Envio archivo del ejemplo.
https://docs.google.com/spreadsheets/d/1MNgniQk2oy06xTWsExNNOMieS18A89_1/edit?usp=sharing&ouid=11185...
@Manuu_108 , Create a product dimension and join with both columns, one join will inactive. Create measure for the not blank count. refer termination example in the link
Use userelationship to activate inactive join
example
User | Count |
---|---|
53 | |
28 | |
19 | |
18 | |
14 |
User | Count |
---|---|
92 | |
86 | |
39 | |
23 | |
22 |