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
michael_knight
Post Prodigy
Post Prodigy

Devolver el mayor valor

Hola

Estoy tratando de crear una columna que mostrará la oferta de valor más grande de una sola propiedad

Esto es lo que se vería en Excel. Muestra el total IN más grande con el estado de la oferta pendiente. La Teoría es bastante directa, pero me está costando incorporarla a Power BI

Pending1.PNG

Cualquier sugerencia será bienvenida. Adjuntaré el archivo PBIX del ejemplo

https://www.dropbox.com/s/iih6b46b8q0t6u3/Pending%20Offers.pbix?dl=0

Salud

Mike

1 ACCEPTED SOLUTION
mahoneypat
Employee
Employee

No está seguro de si desea una columna o una expresión de medida, pero aquí hay una expresión de columna que obtiene los resultados deseados.

Oferta de visualización ?
Var thisoffer - Hoja1[Total IIN]
VAR maxoffer ?
CALCULAR (
MAX ( Sheet1[Total IIN] ),
ALLEXCEPT (
Hoja1,
Sheet1[Propiedad]
),
Sheet1[Estado de la oferta] - "Pendiente"
)
devolución
SI (
Y (
thisoffer - maxoffer,
Sheet1[Estado de la oferta] - "Pendiente"
),
thisoffer,
0
)

saludos

palmadita





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

6 REPLIES 6
michael_knight
Post Prodigy
Post Prodigy

De nada. Si mi respuesta ayudó, por favor márquela como Respuesta.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ashish_Mathur
Super User
Super User

Hola

Esta fórmula de columna calculada funciona

Column = if(AND(CALCULATE(MAX(Sheet1[Total IIN]),FILTER(Sheet1,Sheet1[Property]=EARLIER(Sheet1[Property])&&Sheet1[Offer Status]="Pending"))=Sheet1[Total IIN],Sheet1[Offer Status]="pending"),CALCULATE(MAX(Sheet1[Total IIN]),FILTER(Sheet1,Sheet1[Property]=EARLIER(Sheet1[Property])&&Sheet1[Offer Status]="Pending")),BLANK())

Espero que esto ayude.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Nathaniel_C
Super User
Super User

Hola @michaelknight94 ,
Prueba esto

Max Offer =
VAR CurrentProp =
    MAX ( Sheet1[Property] )
VAR _calc =
    CALCULATE (
        MAX ( Sheet1[Total IIN] ),
        FILTER (
            ALLEXCEPT ( Sheet1, Sheet1[Property] ),
            MAX ( Sheet1[Property] ) = CurrentProp
        )
    )
VAR MOffer =
    IF ( _calc = MAX ( Sheet1[Total IIN] ), MAX ( Sheet1[Total IIN] ), "" )
RETURN
    MOffer

offer.PNG
Avísame si tienes alguna pregunta.

Si esto resuelve sus problemas, márquelo como la solución, para que otros puedan encontrarlo fácilmente. Kudos 👍son agradables también.
Nathaniel





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

Proud to be a Super User!




Hola @michaelknight94 ,
Lo siento, se perdió la Pendiente. Esta es la medida

Max Offer =
VAR CurrentProp =
    MAX ( Sheet1[Property] )
VAR _calc =
    CALCULATE (
        MAX ( Sheet1[Total IIN] ),
        FILTER (
            ALLEXCEPT ( Sheet1, Sheet1[Property] ),
            MAX ( Sheet1[Property] ) = CurrentProp
                && Sheet1[Offer Status] = "Pending"
        )
    )
VAR MOffer =
    IF ( _calc = MAX ( Sheet1[Total IIN] ), MAX ( Sheet1[Total IIN] ), "" )
RETURN
    MOffer


Avísame si tienes alguna pregunta.

Si esto resuelve sus problemas, márquelo como la solución, para que otros puedan encontrarlo fácilmente. Kudos 👍son agradables también.
Nathaniel





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

Proud to be a Super User!




mahoneypat
Employee
Employee

No está seguro de si desea una columna o una expresión de medida, pero aquí hay una expresión de columna que obtiene los resultados deseados.

Oferta de visualización ?
Var thisoffer - Hoja1[Total IIN]
VAR maxoffer ?
CALCULAR (
MAX ( Sheet1[Total IIN] ),
ALLEXCEPT (
Hoja1,
Sheet1[Propiedad]
),
Sheet1[Estado de la oferta] - "Pendiente"
)
devolución
SI (
Y (
thisoffer - maxoffer,
Sheet1[Estado de la oferta] - "Pendiente"
),
thisoffer,
0
)

saludos

palmadita





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


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.