Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Buenas tardes, de antemano agradecerlos por la ayuda, tengo una tabla de (precios de producto) que va cambiando constantemente, lo que necesito es traer los precios actualizados a la tabla de ventas para poder sumar y obtener el total, o hay otra forma mas sencilla de poder obtener el total de ventas?
Estos son los pasos que puede seguir:
1. En Power query. Agregar columna – Columna índice – Desde 1 (Añadir para la tabla Ventas)
2. Crear medida.
measure_Precio Unitario =
var _max=CALCULATE(MAX('Table de Precio'[FechaPrecio]),FILTER(ALL('Table de Precio'),'Table de Precio'[SKU]=MAX('Ventas'[SKU])&&'Table de Precio'[FechaPrecio]<=MAX('Ventas'[Fecha Venta])))
return
CALCULATE(SUM('Table de Precio'[Precio Unitario]),FILTER(ALL('Table de Precio'),'Table de Precio'[SKU]=MAX('Ventas'[SKU])&&'Table de Precio'[FechaPrecio]=_max))
Flag =
[measure_Precio Unitario] * MAX('Ventas'[Pedido])
Total Ventas =
var _table=SUMMARIZE('Ventas','Ventas'[Index],"_value",[Flag])
return
IF(HASONEVALUE('Ventas'[Index]),[Flag],SUMX(_table,[_value]))
3. Resultado:
Si necesita pbix, haga clic aquí.
Saludos
Liu Yang
Si esta publicación ayuda, considere Aceptarla como la solución para ayudar a los otros miembros a encontrarla más rápidamente
Puedes por favor publicar la información en formato datos en lugar de imágenes?
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.