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

Valor máximo de dos columnas - Mostrar espacios en blanco

Hola

Estoy teniendo problemas para obtener un valor máximo único para una fila de tres columnas en una matriz.

Las columnas son: Nombre, Fecha (Mes), Precio

El conjunto de datos:

NombreMesPrecio
AEnero75.000
AEnero150.000
AMarzo250.000
BEnero350.000
BEnero175.000
BMarzo150.000
CMarzo75.000
CMarzo65.000
CEnero125.000

Una fórmula Max() simple dará como resultado:

NombreEneroMarzoTotal (máx.)
A150.000250.000250.000
B350.000150.000350.000
C125.00075.000125.000
Total (máx.)350.000250.000

Lo que estoy apuntando a:

NombreEneroMarzoTotal (máx.)
A 250.000250.000
B350.000 350.000
C
Total (máx.)350.000250.000

Por lo tanto, debe mostrar un espacio en blanco cuando el valor Max no es válido en este contexto. C no tiene un precio máximo en enero o marzo, por lo tanto en blanco.

¿Alguna sugerencia?

2 REPLIES 2
v-lid-msft
Community Support
Community Support

Hola @merlingsf ,

Podemos intentar crear una medida para satisfacer sus requisitos:

Measure =
SUMX (
    DISTINCT ( 'Table'[Month] ),
    VAR result =
        MAXX (
            CALCULATETABLE ( DISTINCT ( 'Table'[Name] ), ALLSELECTED () ),
            CALCULATE ( MAX ( 'Table'[Price] ) )
        )
    RETURN
        IF ( CALCULATE ( MAX ( 'Table'[Price] ) ) = result, result, BLANK () )
)

1.jpg


Por cierto, pbIX archivo como adjunto.


Saludos

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hola @v miembro-msft,

Muchas gracias por tomarse el tiempo para ver esto.

Esto parece resolver el problema.

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.