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!!!
Se trata de artículos que provienen de distintos fabricantes.
Cada fabricante ofrece un descuento distinto por la compra de sus artículos.
Tenemos una tabla con 4 columnas: Articulo, fabricante, articulo&fabricante y descuento.
Necesitaría una 5ª columna donde aparezca la prioridad de compra.
Es decir, el producto 105 lo producen 4 fabricantes distintos; del fabricante 1 puedo obtener el 62% de descuento, del fabricante 2, el 60%, del fabricante 3 el 40% y del fabricante 4 el 30%.
En caso de que el mismo articulo tenga el mismo descuento en distintos fabricantes la prioridad debe ser la misma.
ARTICULO | FABRICANTE | ART&FABRICANTE | DESCUENTO | PRIORIDAD |
105 | 1 | 105 // 1 | 62 | 1 |
105 | 2 | 105 // 2 | 60 | 2 |
105 | 3 | 105 // 3 | 40 | 3 |
105 | 4 | 105 // 4 | 30 | 4 |
277 | 1 | 277 // 1 | 62 | 1 |
277 | 2 | 277 // 2 | 60 | 2 |
277 | 4 | 277 // 4 | 60 | 2 |
Muchas gracias de antemano por vuestra ayuda.
Solved! Go to Solution.
Hola
No estoy seguro de cómo se ve su modelo de datos, pero verifique la imagen a continuación y el archivo pbix adjunto.
Priority measure: =
IF (
HASONEVALUE ( Data[ARTICLE] ),
RANKX (
FILTER ( ALL ( Data ), Data[ARTICLE] = MAX ( Data[ARTICLE] ) ),
CALCULATE ( SUM ( Data[DISCOUNT] ) ),
,
DESC
)
)
Hola
No estoy seguro de cómo se ve su modelo de datos, pero verifique la imagen a continuación y el archivo pbix adjunto.
Priority measure: =
IF (
HASONEVALUE ( Data[ARTICLE] ),
RANKX (
FILTER ( ALL ( Data ), Data[ARTICLE] = MAX ( Data[ARTICLE] ) ),
CALCULATE ( SUM ( Data[DISCOUNT] ) ),
,
DESC
)
)
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 | |
2 | |
2 | |
2 | |
1 |