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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Super User
Super User

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.