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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Nahuelgomez
New Member

Formula de excel a power bi

Saludos quisiera consultarles cómo podría convertir esta fórmula de excel a power bi

 

=SI(Y([@Actividad]="PREPARACION DE SUELO";[@[Estado: TRABAJANDO]]>0,00347222;[@Supervisor]="ORUGA");SI(O(ESNUMERO([@UM])=FALSO;Y([@UM]<>"";ESNUMERO([@UM])=VERDADERO;[@UM]<100000););"VERIFICAR";"OK");"OK")

 

 

 

Lo he intentado pero tengo problemas a la hora de usar la función Y  ,y la función O, cómo así también tuve el problema de las comparación de dax por los valores de tipo texto y número, el bi me recomienda usar algún value o format pero no sé cómo aplicarlos en está fórmula 

 

 

Columna = IF( AND(BdIngCampo[Supervisor] = "ORUGA",BdIngCampo[Estado: TRABAJANDO] > 0.00347222),IF(OR(NOT(ISNUMBER(BdIngCampo[UM])),AND(BdIngCampo[UM] <> BLANK(),ISNUMBER(BdIngCampo[UM]))),IF(AND(BdIngCampo[UM] < 100000 ,NOT(ISNUMBER(BdIngCampo[UM]))),"VERIFICAR","OK"),"OK" ))

 

 

3 REPLIES 3
technolog
Super User
Super User

I hope this message finds you well. I've noticed that this solution remain unresolved. If any of you have managed to find a resolution to the issue, I kindly request that you share your solution for the benefit of the entire community. Alternatively, if you're still facing challenges, please do let us know as well.

Your insights and updates will greatly assist others who might be encountering the same challenge.

v-rzhou-msft
Community Support
Community Support

Hi @Nahuelgomez ,

 

Due to I don't know your data model, here I will give you some suggestions.

Column =
VAR _CHECKNUMBER =
    MOD ( [@UM], 2 )
RETURN
    IF (
        'TableName'[@Activity] = "SOIL PREPARATION"
            && 'TableName'[@[Status: WORKING]]>0.00347222&&[@Supervisor] = "ORUGA",
        IF (
            OR (
                ISERROR ( _CHECKNUMBER ),
                [@UM] <> ""
                    && ISERROR ( _CHECKNUMBER ) = FALSE ()
                    && [@UM] < 100000
            ),
            "CHECK",
            "OK"
        ),
        "OK"
    )

 

Best Regards,

Rico Zhou

 

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

 

Mahesh0016
Super User
Super User

@Nahuelgomez 
Parece que estás tratando de traducir una fórmula de Excel a una expresión DAX en Power BI. La fórmula original parece estar aplicando una lógica condicional bastante compleja utilizando las funciones SI, Y y O en Excel. Vamos a intentar traducir esto a una expresión DAX en Power BI.

Primero, vamos a desglosar la fórmula original de Excel para entenderla mejor:

```excel
=SI(
Y(
[@Actividad]="PREPARACION DE SUELO",
[@[Estado: TRABAJANDO]]>0.00347222,
[@Supervisor]="ORUGA"
),
SI(
O(
ESNUMERO([@UM])=FALSO,
Y([@UM]<>"", ESNUMERO([@UM])=VERDADERO, [@UM]<100000)
),
"VERIFICAR",
"OK"
),
"OK"
)
```

Ahora, vamos a intentar traducir esto a una expresión DAX en Power BI. Ten en cuenta que algunas de las funciones de Excel no tienen equivalentes directos en DAX, por lo que la traducción podría requerir un enfoque ligeramente diferente:

```dax
Columna =
IF(
AND(
BdIngCampo[Actividad] = "PREPARACION DE SUELO",
BdIngCampo[Estado: TRABAJANDO] > 0.00347222,
BdIngCampo[Supervisor] = "ORUGA"
),
IF(
OR(
NOT(ISNUMBER(BdIngCampo[UM])),
AND(
BdIngCampo[UM] <> BLANK(),
ISNUMBER(BdIngCampo[UM])
)
),
IF(
AND(
BdIngCampo[UM] < 100000,
NOT(ISNUMBER(BdIngCampo[UM]))
),
"VERIFICAR",
"OK"
),
"OK"
),
"OK"
)
```

La expresión DAX que has proporcionado en tu mensaje se ve bastante similar a la traducción de la fórmula original de Excel. Asegúrate de que las columnas de la tabla `BdIngCampo` sean nombradas correctamente y estén en el formato adecuado en Power BI. Recuerda que DAX maneja un poco diferente la lógica condicional y las operaciones, por lo que es importante verificar que las condiciones y las funciones se apliquen correctamente en el contexto de Power BI.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.