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.
Tengo dos medidas que están funcionando muy bien como se define a continuación. También estoy tratando de crear una nueva medida que devuelva los activos del año anterior. La tabla de hechos y la tabla de calendario no están unidas ya que la tabla de hechos tiene dos campos de intervalo de fechas, DateBeg y DateEnd.
Se intentó utilizar la función DateAdd para crear una nueva medida, pero no es válida.
VAR PYCurrDate = DATEADD(SELECTEDVALUE('Calendar'[CalDate]), -1, AÑO)
¡Agradezco cualquier ayuda sobre cómo puedo lograr esto y gracias!
Solved! Go to Solution.
@JAKEDBG , Prueba como
ActiveAsOfPY =
VAR CurrDate1 = SELECTEDVALUE('Calendar'[CalDate])
VAR CurrDate = fecha(año(CurrDate1)-1, mes(CurrDate1), día(CurrDate1))
Resultados VAR = CALCULAR(
[Activo],
CurrDate >= EmployeeAsOf[DateBeg],
CurrDate <= EmployeeAsOf[DateEnd])
DEVOLUCIÓN
RESULTADOS
@JAKEDBG , Prueba como
ActiveAsOfPY =
VAR CurrDate1 = SELECTEDVALUE('Calendar'[CalDate])
VAR CurrDate = fecha(año(CurrDate1)-1, mes(CurrDate1), día(CurrDate1))
Resultados VAR = CALCULAR(
[Activo],
CurrDate >= EmployeeAsOf[DateBeg],
CurrDate <= EmployeeAsOf[DateEnd])
DEVOLUCIÓN
RESULTADOS
¡Gracias por su ayuda! Esa fue una solución rápida y funcionó exactamente como tenía que ser.
¡Se lo agradezco!
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 |