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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Ninex
New Member

Calcular Mediana de lineas por TKT

Hola a todos,

En una tabla de Ventas con la siguiente estructura

 

Nro TKT.  Id Articulo Cantidad      Precio    Importe TKT

1                   A001         2             $ 10.00.      $ 35.00

1                   A002         1             $ 15.00.      $ 35.00

2                   A001         1             $ 10.00.      $ 10.00

3                   B005         1             $   8.50.      $ 33.50

3                   A004         2             $  10.00      $ 33.50

3                   B002         1             $    5.00      $ 33.50

 

Quisiera saber como hacer para hacer una medida que calcule la mediana de cantidad de lineas (filas) x TKT.

Tambien me gustaria saber como hacer el SUM de Importe x TKT.

Desde ya muchas gracias y saludos a todos.

 

Daniel

 

 

 

 

 

 
 

 

2 REPLIES 2
Icey
Community Support
Community Support

Hi @Ninex ,

 

Please show us the result you want. This will help us understand your requirements better.

 

 

Best Regards,

Icey

AllisonKennedy
Community Champion
Community Champion

I don't know if I understand all of your question, but for the average or mediana you could try:

Mediana = AVERAGEX(Tabla, Tabla[Cantidad]*Tabla[TKT])

You can do the same for SUM, just not sure what you need to multiply as your sample table looks like Importe and TKT are the same column?

SUMX(Tabla, Tabla[Cantidad]*Tabla[TKT])

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.