Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
)
)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.