Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hola datanauts,
En PBI (ejemplo en la tabla siguiente), necesito obtener la columna "VeryFirstTestOkay", que da valores booleanos según varias condiciones de filtrado.
La columna "VeryFirstTestOkay" solo devolverá 1 si:
En palabras humanas: Tengo que averiguar, si un artículo ha pasado por una prueba sin errores en la primera vez o no.
| Artículo | Timestamp | Mensaje de texto | VeryFirstTestOkay | Por qué "FirstTestOkay" tiene su valor |
| A | 04.08.2020 10:27 | Inicio del sistema | 0 | 0 - porque "Texto" no contiene ">0 Errores" |
| A | 04.08.2020 10:29 | Prueba de resistencia | 0 | 0 - porque "Texto" no contiene ">0 Errores" |
| A | 04.08.2020 10:30 | 0 Errores | 1 | 1 - porque "Texto" contiene ">0 Errores" |
| B | 04.08.2020 10:35 | Inicio del sistema | 0 | 0 - porque "Texto" no contiene ">0 Errores" |
| B | 04.08.2020 10:36 | Fracaso | 0 | 0 - porque "Texto" no contiene ">0 Errores" |
| C | 04.08.2020 10:40 | Inicio del sistema | 0 | 0 - porque "Texto" no contiene ">0 Errores" |
| C | 04.08.2020 10:41 | Prueba de resistencia | 0 | 0 - porque "Texto" no contiene ">0 Errores" |
| C | 04.08.2020 10:43 | 1 Error | 0 | 0 - porque "Texto" contiene ">0 Errores" |
| C | 04.08.2020 10:44 | Inicio del sistema | 0 | 0 - porque "Texto" no contiene ">0 Errores" |
| C | 04.08.2020 10:46 | 0 Errores | 1 | 1 - porque "Texto" contiene ">0 Errores" y el artículo no se ha probado antes. |
| A | 05.08.2020 15:11 | Inicio del sistema | 0 | 0 - porque "Texto" no contiene ">0 Errores" |
| A | 05.08.2020 15:12 | 1 Error | 0 | 0 - porque "Texto" no contiene ">0 Errores" & "VeryFirstTestOkay" ya se ha establecido en 1 para este artículo |
@dyiezb24 - Así que básicamente esto es Búsqueda Min / Max https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/m-p/985814#M434
VeryFirstTestOkay =
VAR __Min = MINX(FILTER('Table',[Text] = "0 Errors" && [Article] = EARLIER('Table'[Article])),[Timestamp]
RETURN
IF([Timestamp] = __Min && [Text] = "0 Errors",1,0)
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.