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

Dax a Powerquery

¿Consulta de energía desde dax?

Hola, ¿alguien puede ayudarme a optimizar esta consulta de dax a Powerquery?

IF([CONSENTIMIENTO]=="CSC", IF([OUTCOME_Msh_FLAG]=="Y",IF([Msh_DEC_DTTM]=BLANK(),-1,[Msh_Timeliness]),[Puntualidad]),[Puntualidad])
2 ACCEPTED SOLUTIONS
Syndicate_Admin
Administrator
Administrator

Suponiendo que estas son todas las referencias de columna sería algo como lo siguiente

if [CONSENT] ="CSC" then

if [OUTCOME_Msh_FLAG] ="Y" entonces
if [Msh_DEC_DTTM] = null then -1
else [Msh_Timeliness]
else [Puntualidad]
else [Puntualidad]

View solution in original post

Syndicate_Admin
Administrator
Administrator

No @jaltoft

En Power query , la fórmula para la función SI es así:

if "if-condition" then "true-expression" else "false-expression"

Así que para su Dax, podemos convertirlo así:

if [CONSENT]="CSC" then if [OUTCOME_Msh_FLAG]="Y" then if [Msh_DEC_DTTM]=null then -1 else [Msh_Timeliness] else [Timeliness] else [Timeliness]

Ailsamsft_0-1624344515018.png

Y el resultado es el mismo que DAX

Ailsamsft_1-1624344515020.png

Saludos

Equipo de apoyo a la comunidad _ Ailsa Tao

Si esta publicación ayuda, entonces por favor considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

View solution in original post

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

No @jaltoft

En Power query , la fórmula para la función SI es así:

if "if-condition" then "true-expression" else "false-expression"

Así que para su Dax, podemos convertirlo así:

if [CONSENT]="CSC" then if [OUTCOME_Msh_FLAG]="Y" then if [Msh_DEC_DTTM]=null then -1 else [Msh_Timeliness] else [Timeliness] else [Timeliness]

Ailsamsft_0-1624344515018.png

Y el resultado es el mismo que DAX

Ailsamsft_1-1624344515020.png

Saludos

Equipo de apoyo a la comunidad _ Ailsa Tao

Si esta publicación ayuda, entonces por favor considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

Syndicate_Admin
Administrator
Administrator

Suponiendo que estas son todas las referencias de columna sería algo como lo siguiente

if [CONSENT] ="CSC" then

if [OUTCOME_Msh_FLAG] ="Y" entonces
if [Msh_DEC_DTTM] = null then -1
else [Msh_Timeliness]
else [Puntualidad]
else [Puntualidad]

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.