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.
Estimados expertos,
He utilizado esta función para WTD este año y funciona perfectamente.
Intenté esto a WTD el año pasado y siempre vuelve en blanco. Luego traté de eliminar el último fitler Date < Sameday el año pasado, mostró las ventas totales de toda la misma semana el año pasado no el WTD.
¿Puedes ayudarme a aconsejarme sobre esto? ¿Dónde hice mal?
Muchas gracias por tu ayuda.
Hola
Por favor, siga estos pasos:
1)Crear una columna WeekNum:
WeekNum = WEEKNUM('Table'[Date])
2)Pruebe estas dos medidas:
WTD(Current Year) =
IF (
YEAR ( MAX ( 'Table'[Date] ) ) = YEAR ( TODAY () ),
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[WeekNum] IN FILTERS ( 'Table'[WeekNum] )
&& 'Table'[Date] <= MAX ( 'Table'[Date] )
)
)
)
WTD(Last Year) =
IF (
YEAR ( MAX ( 'Table'[Date] ) )
= YEAR ( TODAY () ) - 1,
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[WeekNum] IN FILTERS ( 'Table'[WeekNum] )
&& 'Table'[Date] <= MAX ( 'Table'[Date] )
)
)
)
3)El resultado muestra:
Vea mi archivo pbix adjunto.
Saludos
Giotto
@v-gizhi-msft muchas gracias por sus instrucciones exhaustivas, incluyendo el archivo pbix. Te lo agradezco.
Sin embargo, utilicé la tarjeta para mostrar el último año WTD y se mostraría en blanco.
Hola
Por favor, intente esto:
WTD(Last Year) =
SUMX (
DISTINCT ( 'Table'[Date] ),
CALCULATE (
IF (
YEAR ( MAX ( 'Table'[Date] ) )
= YEAR ( TODAY () ) - 1,
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[WeekNum] IN FILTERS ( 'Table'[WeekNum] )
&& 'Table'[Date] <= MAX ( 'Table'[Date] )
)
)
)
)
)
El resultado muestra:
Vea mi archivo pbix adjunto.
Saludos
Giotto
@Tan_Bui , consulte mi blog. No tengo el año pasado allí, pero se puede probar estos dos cálculos
LYWTD = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=(max('Date'[Week Rank]) -52) && 'Date'[Weekday] <=max('Date'[Weekday])))
Or
LYWTD = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Year]=(max('Date'[Year]) -1)
&& 'Date'[Week Number]=(max('Date'[Week Number]))
&& 'Date'[Weekday] <=max('Date'[Weekday])))
Por favor, vea/me gusta/comparte mi seminario web sobre Time Intelligence: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-Y...
Mis consejos de Youtube en: https://www.youtube.com/playlist?list=PLPaNVDMhUXGYrm5rm6ME6rjzKGSvT9Jmy
Aprecia tus Felicitaciones.
Muchas gracias. Usé una de tus soluciones y funcionó
LYWTD ? CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Year]-(max('Date'[Year]) -1) && 'Date'[Week Number]-(max('Date'[Week Number])) && 'Date'[Weekday] <-max(Date'))))))))))))))))))))))))))))))))))))))))"&&Date'[Weekday'
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 |