Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hola
Estoy buscando devolver la fecha más cercana para la cual una medida que evaluo está por debajo de cero:
Evaluo la evolución de un nivel de stock para diferentes materiales y deseo devolver la primera fecha en la que uno de los materiales es con un valor de stock por debajo de cero. Traté de usar FIRSTDATE y LASTDATE pero sin éxito:
ShortageDate = CALCULATE(FIRSTDATE(DateTable[Date]), FILTER(DateTable, [Real Stock] < 0))
Con esta expresión devuelve la fecha en la que la agregación de todos los stocks para los diferentes materiales va por debajo de cero.
Gracias de antemano por su ayuda
Solved! Go to Solution.
Hola, @SimonA
Debe colocar la columna de material como segmentación de datos y probar esta medida:
ShortageDate =
MINX (
FILTER (
ALL ( DateTable ),
[Real Stock] < 0
&& [Material] = SELECTEDVALUE ( Material )
),
[Date]
)
Si no resuelve su problema, no dude en preguntarme.
Saludos
Janey Guo
Si este post ayuda, entonces considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
Hola, @SimonA
Debe colocar la columna de material como segmentación de datos y probar esta medida:
ShortageDate =
MINX (
FILTER (
ALL ( DateTable ),
[Real Stock] < 0
&& [Material] = SELECTEDVALUE ( Material )
),
[Date]
)
Si no resuelve su problema, no dude en preguntarme.
Saludos
Janey Guo
Si este post ayuda, entonces considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
Sería mejor si pudiera ver cómo se ven los datos.
Pero me imagino esta medida
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.