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
Syndicate_Admin
Administrator
Administrator

Instrucción IF para seleccionar un valor de dos filas

Querida comunidad,

Quiero comparar el valor real y del plan de un artículo y, en función de la comparación, elijo el valor más alto. El resultado del siguiente ejemplo debe ser 150.

Kpham_0-1653587568008.png

Kpham_1-1653587697520.png



Estimated Engineering Costs = SUMX(VALUES('PS ProjectResults'),


                    IF([ETC ENG Flag]="X",
                                [ACT Engineering Costs],
                                IF([ACT Engineering Costs]<[Plan Engineering Costs ],
                                    [Plan Engineering Costs ],
                                    [ACT Engineering Costs])))



1 ACCEPTED SOLUTION

Estimated Engineering Costs = SUMX(VALUES('PS ProjectResults'),


                    IF([ETC ENG Flag]="X",
                                [ACT Engineering Costs],//[Plan Engineering Costs ]))
                                IF([ACT Engineering Costs]<[Plan Engineering Costs ],
                                  IF ( [ACT Engineering Costs] < [Plan Engineering Costs ], [Plan Engineering Costs ], [ACT Engineering Costs] ),
                                   BLANK())))

cuando estoy combinando la lógica está funcionando. Seguro que no es la mejor sintaxis, pero está haciendo el trabajo. Muchas gracias

View solution in original post

4 REPLIES 4
Syndicate_Admin
Administrator
Administrator

@Kpham ,

Le gustaría mostrar el valor de la medida [Planificar costos de ingeniería] o el valor de la medida [Costos de ingeniería de ACT], dependiendo de cuál de ellos sea más alto, ¿correcto?

¿Ha intentado usar la declaración if de su medida [Costos estimados de ingeniería]?

Estimated Engineering Costs = 
IF ( [ACT Engineering Costs] < [Plan Engineering Costs ], [Plan Engineering Costs ], [ACT Engineering Costs] )

Hágame saber si esto ayuda 🙂

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/

que da el resultado correcto. Sin embargo, el otro escenario aún no está cubierto, pero supongo que / espero que sepa cómo agregar esto:

Kpham_0-1653589320063.png

@Kpham ,

¿Cuál es el otro escenario? 🙂

Creo que tiene que ver con la [BANDERA ETC ENG]... Le doy una oportunidad al azar. ¿Es esto?

IF ( 
    [ETC ENG Flag] = "X", 
    [ACT Engineering Costs],
    IF ( 
        [ACT Engineering Costs] < [Plan Engineering Costs ],
        [Plan Engineering Costs ],
        [ACT Engineering Costs]
    ),
    BLANK()
)

De lo contrario, especifique su requisito 🙂

¡Gracias!

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/

Estimated Engineering Costs = SUMX(VALUES('PS ProjectResults'),


                    IF([ETC ENG Flag]="X",
                                [ACT Engineering Costs],//[Plan Engineering Costs ]))
                                IF([ACT Engineering Costs]<[Plan Engineering Costs ],
                                  IF ( [ACT Engineering Costs] < [Plan Engineering Costs ], [Plan Engineering Costs ], [ACT Engineering Costs] ),
                                   BLANK())))

cuando estoy combinando la lógica está funcionando. Seguro que no es la mejor sintaxis, pero está haciendo el trabajo. Muchas gracias

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.