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
ehartanto
Frequent Visitor

Suma resumida y promedio en la misma columna

Necesito ayuda para resumir mis datos (suma o promedio) basados en otra columna. Por ejemplo, con los datos a continuación, me gustaría promediar el alquiler y margen, pero sumar los ingresos. ¿Es posible hacer esto? Todo está en una columna para poder profundizar en varias categorías con cada métrica única. En esa nota es posible formatear onlu ciertas filas, por ejemplo, si métrica - margen, formatear en %.

Fecha Cantidad métrica
Ingresos de enero
Ingresos de febrero
Alquiler de enero

Alquiler de febrero

Margen de enero

Margen de febrero


Gracias de antemano!

2 ACCEPTED SOLUTIONS
Greg_Deckler
Super User
Super User

@ehartanto Claro, algo como:

Total Revenue = SUMX(FILTER('Table',[Metric]="Revenue"),[Amount])

Average Margin = AVERAGEX(FILTER('Table',[Metric]="Margin",[Amount])

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

amitchandak
Super User
Super User

@ehartanto , En caso de que los desee Unpivot se puede despivot

https://radacad.com/pivot-and-unpivot-with-power-bi

O tener medidas como

Ingresos: calculate(sum(Table[Amount]), filter(Table,Table[Metric] á"Revenue"))
Tasa de alquiler: calculate(sum(Table[Amount]), filter(Table,Table[Metric] á"Tarifa de alquiler"))
Margen: calculate(sum(Table[Amount]), filter(Table,Table[Metric] á"Margin"))

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@ehartanto , En caso de que los desee Unpivot se puede despivot

https://radacad.com/pivot-and-unpivot-with-power-bi

O tener medidas como

Ingresos: calculate(sum(Table[Amount]), filter(Table,Table[Metric] á"Revenue"))
Tasa de alquiler: calculate(sum(Table[Amount]), filter(Table,Table[Metric] á"Tarifa de alquiler"))
Margen: calculate(sum(Table[Amount]), filter(Table,Table[Metric] á"Margin"))

Greg_Deckler
Super User
Super User

@ehartanto Claro, algo como:

Total Revenue = SUMX(FILTER('Table',[Metric]="Revenue"),[Amount])

Average Margin = AVERAGEX(FILTER('Table',[Metric]="Margin",[Amount])

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.