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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Fila mínima, máxima y media

Hola

Tengo a continuación la tabla de datos en PBI -

ABC
Nos 4,080 2,548 860
suyos 5,897 2,191 421
En 1,635 2,808 339
Uk 754 1,359 629

Quiero obtener Min, Max y Avg de la columna A, B y C en fila como abajo en PBI -

ABC
Nos 4,080 2,548 860
suyos 5,897 2,191 421
En 1,635 2,808 339
Uk 754 1,359 629
Min 754 1,359 339
máximo 5,897 2,808 629
Avg 2,260 2,083 484

¿Cómo puedo lograrlo? ¡Por favor, ayúdenme!

3 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Easha ,

min A - Calcular(min(Tabla[A]),allselected(Table))

Max A - Calcular(Amx(Tabla[A]),allselected(Table))

Y así sucesivamente.

Otra forma es despivo de los datos A,B,C son los valores de Nueva Columna Col1 (Con A,b ,C), Valor con Valor

https://radacad.com/pivot-and-unpivot-with-power-bi
Min - Calculate(min(Table[Value]),allexcept(Table,Table[Col1]))

Max - Calculate(max(Table[Value]),allexcept(Table,Table[Col1]))

Calcular medio (promedio(tabla[valor]),allexcept(Tabla,Tabla[Col1]))

pantalla con Mostrar en fila en matriz

https://www.burningsuit.co.uk/blog/2019/04/7-secrets-of-the-matrix-visual/

View solution in original post

Greg_Deckler
Super User
Super User

@Easha- Puede despocupar esas columnas o utilizar agregaciones MC

https://community.powerbi.com/t5/Quick-Measures-Gallery/Multi-Column-Aggregations-MC-Aggregations/m-...


@ 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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

v-shex-msft
Community Support
Community Support

Hola @Easha,

También creo que las columnas no votadas deben ser una manera sencilla de lograr sus necesidades.
Si no desea cambiar la estructura, puede intentar utilizar la siguiente fórmula de cálculo de tabla. (Codigo estos valores en fórmulas y anexo manualmente estas filas agregadas)

Table= 
VAR temp =
    SELECTCOLUMNS (
        { "Min", "Max", "Avg" },
        "Region", [Value],
        "A",
            SWITCH (
                [Value],
                "Min", MINX ( ALL ( 'Table'[A] ), [A] ),
                "Max", MAXX ( ALL ( 'Table'[A] ), [A] ),
                "Avg", AVERAGEX ( ALL ( 'Table'[A] ), [A] )
            ),
        "B",
            SWITCH (
                [Value],
                "Min", MINX ( ALL ( 'Table'[B] ), [B] ),
                "Max", MAXX ( ALL ( 'Table'[B] ), [B] ),
                "Avg", AVERAGEX ( ALL ( 'Table'[B] ), [B] )
            ),
        "C",
            SWITCH (
                [Value],
                "Min", MINX ( ALL ( 'Table'[C] ), [C] ),
                "Max", MAXX ( ALL ( 'Table'[C] ), [C] ),
                "Avg", AVERAGEX ( ALL ( 'Table'[C] ), [C] )
            )
    )
RETURN
    UNION ( 'Table', temp )

saludos

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

3 REPLIES 3
v-shex-msft
Community Support
Community Support

Hola @Easha,

También creo que las columnas no votadas deben ser una manera sencilla de lograr sus necesidades.
Si no desea cambiar la estructura, puede intentar utilizar la siguiente fórmula de cálculo de tabla. (Codigo estos valores en fórmulas y anexo manualmente estas filas agregadas)

Table= 
VAR temp =
    SELECTCOLUMNS (
        { "Min", "Max", "Avg" },
        "Region", [Value],
        "A",
            SWITCH (
                [Value],
                "Min", MINX ( ALL ( 'Table'[A] ), [A] ),
                "Max", MAXX ( ALL ( 'Table'[A] ), [A] ),
                "Avg", AVERAGEX ( ALL ( 'Table'[A] ), [A] )
            ),
        "B",
            SWITCH (
                [Value],
                "Min", MINX ( ALL ( 'Table'[B] ), [B] ),
                "Max", MAXX ( ALL ( 'Table'[B] ), [B] ),
                "Avg", AVERAGEX ( ALL ( 'Table'[B] ), [B] )
            ),
        "C",
            SWITCH (
                [Value],
                "Min", MINX ( ALL ( 'Table'[C] ), [C] ),
                "Max", MAXX ( ALL ( 'Table'[C] ), [C] ),
                "Avg", AVERAGEX ( ALL ( 'Table'[C] ), [C] )
            )
    )
RETURN
    UNION ( 'Table', temp )

saludos

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Greg_Deckler
Super User
Super User

@Easha- Puede despocupar esas columnas o utilizar agregaciones MC

https://community.powerbi.com/t5/Quick-Measures-Gallery/Multi-Column-Aggregations-MC-Aggregations/m-...


@ 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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

@Easha ,

min A - Calcular(min(Tabla[A]),allselected(Table))

Max A - Calcular(Amx(Tabla[A]),allselected(Table))

Y así sucesivamente.

Otra forma es despivo de los datos A,B,C son los valores de Nueva Columna Col1 (Con A,b ,C), Valor con Valor

https://radacad.com/pivot-and-unpivot-with-power-bi
Min - Calculate(min(Table[Value]),allexcept(Table,Table[Col1]))

Max - Calculate(max(Table[Value]),allexcept(Table,Table[Col1]))

Calcular medio (promedio(tabla[valor]),allexcept(Tabla,Tabla[Col1]))

pantalla con Mostrar en fila en matriz

https://www.burningsuit.co.uk/blog/2019/04/7-secrets-of-the-matrix-visual/

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors