Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
PeterStuhr
Helper V
Helper V

Comparar precio con precios medios para las mismas selecciones

Hola a todos, tengo una tabla Supplier con lo siguiente:

[SupplierID], [Tipo de trabajo], [Producto], [Precio].

Así que estoy haciendo una matriz que muestra SupplierID --> Tipo de trabajo --> Producto, y el precio para cada uno de ellos.

Lo que necesito es también mostrar el promedio, no dividido por el Proveedor.

Ejemplo:

IdproveedorTipo de trabajoProductoPrecio
1ServicioCerveza20
2ServicioCerveza40

En Matrix quiero mostrar que para el Proveedor 1, el Precio de Servicio y Cerveza es 20, mientras que el Promedio de Servicio y Cerveza es 30. Así que puedo ver que el Proveedor 1 es el más barato. Por supuesto, tenemos muchas combinaciones de tipo de trabajo y producto, pero esta es la idea. ¡Saludos!

2 REPLIES 2
lkalawski
Memorable Member
Memorable Member

@PeterStuhr ,

Puede crear la medida:

Prive Avg =
CALCULATE (
    AVERAGE ( 'Table'[Price] ),
    FILTER (
        ALL ( 'Table' ),
        'Table'[Job Type] = SELECTEDVALUE ( 'Table'[Job Type] )
            && 'Table'[Product] = SELECTEDVALUE ( 'Table'[Product] )
    )
)
amitchandak
Super User
Super User

@PeterStuhr , Pruebe esta medida -

calculate(average(Table[Price]), allexpcept(Table,Table[Type],Table[Product]))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.