Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hola
Tengo datos de pedido de compra (PO) a continuación:
Si Tipo de movimiento es 102, quiero encontrar el valor 101 con el mismo lote y cantidad (en las columnas Cantidad confirmada y Cantidad de contabilización). Cantidad resta en columnas Cantidad confirmada y Cantidad de contabilización .
Así que el resultado y la suma deben tener este aspecto:
Gracias de antemano.
Hola, @mb0307
Es un placer responder por ti.
De acuerdo con su descripción, puede crear una medida, a continuación, utilizarla en el panel de filtro.
Así:
Measure =
IF (
SELECTEDVALUE ( PO[Movement Type] ) = 101,
VAR a =
COUNTROWS (
FILTER (
ALL ( PO ),
[Movement Type] = 102
&& [Posting Quantity] = SELECTEDVALUE ( PO[Posting Quantity] )
&& [Confirmed Quantity] = SELECTEDVALUE ( PO[Confirmed Quantity] )
&& [Batch] = SELECTEDVALUE ( PO[Batch] )
)
)
RETURN
IF ( a > 0, 0, 1 ),
IF (
SELECTEDVALUE ( PO[Movement Type] ) = 102,
VAR b =
COUNTROWS (
FILTER (
ALL ( PO ),
[Movement Type] = 101
&& [Posting Quantity] = SELECTEDVALUE ( PO[Posting Quantity] )
&& [Confirmed Quantity] = SELECTEDVALUE ( PO[Confirmed Quantity] )
&& [Batch] = SELECTEDVALUE ( PO[Batch] )
)
)
RETURN
IF ( b > 0, 0, 1 )
)
)
Si no resuelve su problema, por favor no dude en preguntarme.
Saludos
Janey Guo
Si este post ayuda,entonces considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
¿La cantidad solicitada y confirmada de 102 siempre es igual al valor de 101? Si no, no podemos eliminar las filas que se han iluminado.
No estoy seguro de si esta es una buena solución. Aquí hay una solución alternativa para su referencia.
Puede crear tres columnas.
New Movement =
if('Table'[Movement Type]=102,if(ISBLANK(MAXX(FILTER('Table','Table'[Movement Type]=101 && 'Table'[Batch]=EARLIER('Table'[Batch])),'Table'[Posting Quantity])),'Table'[Movement Type],101),'Table'[Movement Type])
New Posting Quantity =
if('Table'[Movement Type]=102,if(ISBLANK(MAXX(FILTER('Table','Table'[Movement Type]=101 && 'Table'[Batch]=EARLIER('Table'[Batch])),'Table'[Posting Quantity])),'Table'[Posting Quantity],'Table'[Posting Quantity]*-1),'Table'[Posting Quantity])
New Request Quantity =
if('Table'[Movement Type]=102,if(ISBLANK(MAXX(FILTER('Table','Table'[Movement Type]=101 && 'Table'[Batch]=EARLIER('Table'[Batch])),'Table'[Posting Quantity])),'Table'[Request Quantity],'Table'[Request Quantity]*-1),'Table'[Request Quantity])
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
2 | |
2 | |
2 | |
1 | |
1 |