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

Obtener el promedio de una columna sin filtros

Necesita ayuda en los datos de abajo. Quiero que los ClothsWeight y HomeWeight aparezcan para todas las filas. Sin tener ningún filtro en él. Intenté allexcept , Todo Pero no está funcionando. A continuación se muestra el código que tengo ahora

HomeWeight ? CALCULATE(
PROMEDIO(Sheet3[WeightedValue]),
Sheet3[Tipo] IN á "casa"
)

Capture.PNG

CuartoTipoWeightedValueÍndiceFiltroGrupos
Q2 2019Paños0.411PersonaT2T
Q2 2019Paños0.412PersonaT2T
Q2 2019Paños0.413PersonaT2T
Q2 2019Casa0.054PersonaB2b
Q2 2019Casa0.055PropietarioB2b
Q2 2019Casa0.056PropietarioB2b
Q2 2019Casa0.057PersonaB2b
Q2 2019Vehículo0.548PersonaB2b
Q2 2019Vehículo0.549PropietarioT2T
Q3 2020Paños0.4510PropietarioT2T
Q3 2020Paños0.4511PropietarioB2b
Q3 2020Casa0.0512PersonaB2b
Q3 2020Casa0.0513PersonaB2b
Q3 2020Casa0.0514PropietarioB2b
Q3 2020Casa0.0515PropietarioB2b
Q3 2020Vehículo0.516PersonaT2T
5 REPLIES 5
ryan_mayu
Super User
Super User

@RevD

por favor, intente esto

Measure = CALCULATE(AVERAGE('table'[WeightedValue]),FILTER(ALL('table'),'table'[Type]="Home"))

Measure2 = CALCULATE(AVERAGE('table'[WeightedValue]),FILTER(ALL('table'),'table'[Type]="cloths"))

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Con esa medida estoy obteniendo el valor promedio general. Pero quiero la salida inferior

Para Q2 2019 Paños quiero .41 en todas las filas para telasPeo

Para el segundo trimestre 2019 Inicio quiero .05 en todas las filas para HomeWeight

Para Q3 2020 Paños quiero .45 en todas las filas para telasPeo

Para Q3 2020 Home quiero .05 en todas las filas para HomeWeight

@RevD

pls probar esto

Measure2 = CALCULATE(AVERAGE('table'[WeightedValue]),FILTER(ALLEXCEPT('table','table'[Quarter]),'table'[Type]="cloths"))

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




La solución está trabajando para las medidas para la misma tabla. Tengo unas medidas adicionales para las que utilizo la tabla de fechas y obtengo el trimestre de ella para el cálculo del trimestre anterior. En la relación me uno en la columna DateCustom con valores 4/1/2019 y 7/1/2019. para el segundo trimestre de 2019 y el tercer trimestre de 2019.

En el Visual i usar YearQuarter de Dim Date

Fecha de atenuación: CALENDARIO(fecha(2019,1,1),fecha(2021,12,31))

CLOTHSWeight á CALCULATE(AVERAGE(Sheet3[WeightedValue]),FILTER(ALLEXCEPT('Sheet3',Sheet3[Quarter]),Sheet3[Type]-"cloths")). Me da el total total de nuevo
Gracias por la ayuda

@RevD

No creé un calendario completo sólo un cuarto

1.PNG

Measure = CALCULATE(AVERAGE('table'[WeightedValue]),FILTER(ALLEXCEPT('table','table'[Quarter],DIMTIME[Quarter]),'table'[Type]="cloths"))

2.PNG

por favor, intente si esto funciona para usted.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.