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.
Hola chicos, simplemente ignoren el significado de los atributos, quería tener una perspectiva sobre cómo podría escribir la misma lógica que tengo a continuación (Tableau) pero usando DAX, para implementar en Power BI:
IF ([Color PRTH] Y [Tipo de estación]='AUTO')
ENTONCES 'Falta PRTH'
ELSEIF ([Tipo Estação]='ANEEL' OR [Tipo Estação]='SYNOP') Y
(([testeConsistencia] > 0 Y [Id Tpconsistmnem] =4) O (ISNULL([PLMT])))
LUEGO 'Medição Nula'
ELSEIF ([PLMT] < 0 O [PLMT] > 100) O
([Tipo Estação] ='AUTO' Y ([PRTH] < 0 O [PRTH] > 50))
LUEGO 'Consistência'
ELSE 'OK'
FIN
Lo he intentado a continuación, pero estoy obteniendo un resultado completamente diferente:
@guigelthe Quizás:
IF (
[Cor PRTH] && [Tipo Estação]="AUTO",
"Falta PRTH",
IF (
([Tipo Estação]="ANEEL" || [Tipo Estação]="SYNOP") &&
(([testeConsistencia] > 0 && [Id Tpconsistmnem] =4) || (ISBLANK([PLMT]),
"Medição Nula",
IF(
([PLMT] < 0 OR [PLMT] > 100) ||
([Tipo Estação] ="AUTO" && ([PRTH] < 0 || [PRTH] > 50),
"Consistência",
"OK"
)
)
)
o una forma más limpia podría ser:
SWITCH(TRUE(),
[Cor PRTH] && [Tipo Estação]="AUTO", "Falta PRTH",
([Tipo Estação]="ANEEL" || [Tipo Estação]="SYNOP") &&
(([testeConsistencia] > 0 && [Id Tpconsistmnem] =4) || (ISBLANK([PLMT]), "Medição Nula",
([PLMT] < 0 OR [PLMT] > 100) ||
([Tipo Estação] ="AUTO" && ([PRTH] < 0 || [PRTH] > 50), "Consistência",
"OK"
)
@Greg_Deckler Está funcionando ahora, gracias Greg, eres el verdadero negocio = D
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
1 |