Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Login for previous month =
/*covers following key points:
1. should use, could use
2. TRUE only i.e. those who have access
3. previous month */
CALCULATE (
[Total Logins],
DATESINPERIOD('Calendar'[Date], min('Calendar'[Date]), -3, month ),
//modified filter context
filter(MainQuery,
MainQuery[P2P dashboard] IN { "Should use", "Could use" } &&
MainQuery[Spend Analytics] IN { "Should use", "Could use" } &&
MainQuery[Demand Forecasting] IN { "Should use", "Could use"} &&
//MAKING SURE EVERYONE HAS ACCESS
MainQuery[P2P - Access] = "TRUE" &&
MainQuery[Demand Forecasting - Access] = "TRUE" &&
MainQuery[Spend Analytics -Access] = "TRUE"
) /*loggin frequency is zero < ode="">
Solved! Go to Solution.
@DataLedAnalysis , cambie al máximo y pruebe
DATESINPERIOD('Calendario'[Fecha], max('Calendario'[Fecha]), -3, mes )
Con Min
si no hay una fecha en contexto, tomará la primera fecha en el calendario. Parcela por mes tomará la fecha de inicio del mes.
Pruebe con max
Hay @DataLedAnalysis ,
El contexto para el DATESINPERIOD('Calendar'[date],,,,) no debe tener el contexto de filtro por MainQuery[Date].
Puede intentar agregar ALL(MainQuery[Date]),esta expresión se usa para quitar el filtro MainQuery[Date], antes de que el DATESINPERIOD('Calendar'[date],,,,).
Se ve así:
CALCULATE (
[Total Logins],
ALL ( MainQuery[Date] ),
DATESINPERIOD ( 'Calendar'[Date], MIN ( 'Calendar'[Date] ), -3, MONTH ),
//unresponsive line
//modified filter context
FILTER (
MainQuery,
MainQuery[P2P dashboard]
IN { "Should use", "Could use" }
&& MainQuery[Spend Analytics]
IN { "Should use", "Could use" }
&& MainQuery[Demand Forecasting]
IN { "Should use", "Could use" }
&& //MAKING SURE EVERYONE HAS ACCESS
MainQuery[P2P - Access] = "TRUE"
&& MainQuery[Demand Forecasting - Access] = "TRUE"
&& MainQuery[Spend Analytics -Access] = "TRUE"
) /*loggin frequency is zero < ode="">
Para comprobar el contexto de DATESINPERIOD(), puede consultar el método en el archivo adjunto.
Saludos
Equipo de apoyo a la comunidad _ chenwu zhu
Si esta publicación ayuda, considere Aceptarla como la solución para ayudar a los otros miembros a encontrarla más rápidamente.
@DataLedAnalysis , cambie al máximo y pruebe
DATESINPERIOD('Calendario'[Fecha], max('Calendario'[Fecha]), -3, mes )
Con Min
si no hay una fecha en contexto, tomará la primera fecha en el calendario. Parcela por mes tomará la fecha de inicio del mes.
Pruebe con max
Gracias, fue un error lógico al no intentar usar max en lugar de min. Sin embargo, funciona con una captura en la que tengo que usar la columna Fecha dentro de la tabla de datos principal, no la tabla de calendario:
Hay @DataLedAnalysis ,
El contexto para el DATESINPERIOD('Calendar'[date],,,,) no debe tener el contexto de filtro por MainQuery[Date].
Puede intentar agregar ALL(MainQuery[Date]),esta expresión se usa para quitar el filtro MainQuery[Date], antes de que el DATESINPERIOD('Calendar'[date],,,,).
Se ve así:
CALCULATE (
[Total Logins],
ALL ( MainQuery[Date] ),
DATESINPERIOD ( 'Calendar'[Date], MIN ( 'Calendar'[Date] ), -3, MONTH ),
//unresponsive line
//modified filter context
FILTER (
MainQuery,
MainQuery[P2P dashboard]
IN { "Should use", "Could use" }
&& MainQuery[Spend Analytics]
IN { "Should use", "Could use" }
&& MainQuery[Demand Forecasting]
IN { "Should use", "Could use" }
&& //MAKING SURE EVERYONE HAS ACCESS
MainQuery[P2P - Access] = "TRUE"
&& MainQuery[Demand Forecasting - Access] = "TRUE"
&& MainQuery[Spend Analytics -Access] = "TRUE"
) /*loggin frequency is zero < ode="">
Para comprobar el contexto de DATESINPERIOD(), puede consultar el método en el archivo adjunto.
Saludos
Equipo de apoyo a la comunidad _ chenwu zhu
Si esta publicación ayuda, considere Aceptarla como la solución para ayudar a los otros miembros a encontrarla más rápidamente.
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |