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
misaki233
Helper II
Helper II

MAX y MIN de una medida

¡Hola a todos!

Tengo una tabla como los siguientes datos.

Columna1Columna2Medida
ADd1
BDd1
CDd1
AFf2
BFf2

"Medida" es una medida basada en la columna2. Ahora quiero mostrar el valor mínimo y el valor máximo de cada column1.

Columna1Columna2Medidaresultado esperado (MIN-MAX)
ADd11-2
BDd11-2
CDd11-1
AFf21-2
BFf21-2

¿Cómo puedo obtener el resultado?

Gracias de antemano.

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hola @misaki233 ,

Puede crear una medida como se indica a continuación:

MIN-MAX = 
VAR _min =
    MINX (
        FILTER ( ALL ( 'Table' ), 'Table'[Column1] = MAX ( 'Table'[Column1] ) ),
        [Measure]
    )
VAR _max =
    MAXX (
        FILTER ( ALL ( 'Table' ), 'Table'[Column1] = MAX ( 'Table'[Column1] ) ),
        [Measure]
    )
RETURN
    CONCATENATE ( CONCATENATE ( _min, "-" ), _max )

MAX and MIN from a measure.JPG

Saludos

Rena

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

View solution in original post

3 REPLIES 3
v-yiruan-msft
Community Support
Community Support

Hola @misaki233 ,

Puede crear una medida como se indica a continuación:

MIN-MAX = 
VAR _min =
    MINX (
        FILTER ( ALL ( 'Table' ), 'Table'[Column1] = MAX ( 'Table'[Column1] ) ),
        [Measure]
    )
VAR _max =
    MAXX (
        FILTER ( ALL ( 'Table' ), 'Table'[Column1] = MAX ( 'Table'[Column1] ) ),
        [Measure]
    )
RETURN
    CONCATENATE ( CONCATENATE ( _min, "-" ), _max )

MAX and MIN from a measure.JPG

Saludos

Rena

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

Hola @misaki233 ,

Crear 3 medidas

medida mínima: CALCULATE(MINX(VALUES('Table'[Column1],[measure]),ALLSELECTED('Table'))

max measure - CALCULATE(MAXX(VALUES('Table'[Column1],[measure]),ALLSELECTED('Table'))

Concatenar medida - CONCATENAR(CONCATENAR([minmeasure], " - "), [medida máxima])

saludos
Harsh Nathani
¿He respondido a tu pregunta? ¡Marca mi puesto como una solución! Apreciar con un Kudos!! (Haga clic en el botón Pulgares arriba)

amitchandak
Super User
Super User

@misaki233 , Pruebe una nueva medida como

minx(filter(allselected(Table),[Column1]-max([Column1])),[Measure]) -maxx(filter(allselected(Table),[Column1]-max([Column1])),[Measure])

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.