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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Syndicate_Admin
Administrator
Administrator

Cómo calcular el promedio con filtros

Buenos días

Actualmente soy principiante de Power BI y trato de aprender a usarlo de la buena manera.

Intento calcular el promedio del porcentaje de error con filtros.

Estas son mis tablas de datos:

'Prueba de tabla FX9600' :

Latermocdelo_0-1659512896821.png

«Ensayo de mesa LRU1002»:

Latermocdelo_1-1659512955256.png

Y mi tabla de resultados:

Latermocdelo_2-1659512998230.png

Quiero calcular el promedio del porcentaje de error (columna: "Moyenne % erreur") con específicos "Session" y "Type de lecteur".

Los datos están en mis otras dos tablas.

Intento resolver este problema con el comando "SWITCH", pero creo que hay una mejor manera (más rápida) de hacerlo.

Este es mi comando que funciona:

Moyenne % Erreur = SWITCH('Param Session'[Type de lecteur],
    "FX9600", SWITCH( [Session], 
                    "Session 0", CALCULATE(AVERAGE('Table test FX9600'[Erreur %]),'Table test FX9600'[Session]="Session 0"),
                    "Session 1", CALCULATE(AVERAGE('Table test FX9600'[Erreur %]),'Table test FX9600'[Session]="Session 1"), 
                    "Session 2",CALCULATE(AVERAGE('Table test FX9600'[Erreur %]),'Table test FX9600'[Session]="Session 2")
                ),
    "LRU1002",  SWITCH( [Session], 
                    "Session 0", CALCULATE(AVERAGE('Table test LRU1002'[Erreur %]),'Table test LRU1002'[Session]="Session 0"),
                    "Session 1", CALCULATE(AVERAGE('Table test LRU1002'[Erreur %]),'Table test LRU1002'[Session]="Session 1"), 
                    "Session 2",CALCULATE(AVERAGE('Table test LRU1002'[Erreur %]),'Table test LRU1002'[Session]="Session 2")
                ),
..........
)

¿Alguien tiene alguna idea para simplificar (y automatizar) esto?

Gracias de antemano

Quentin

0 REPLIES 0

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Solution Authors
Top Kudoed Authors