Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Buenas tardes para todos
Quisiera saber si alguien conoce como cambiar una fecha que se encuentra en un dia no habil, como sabado, domingo o festivo al proximo dia habil, ejemplo:
el 3/12/2022 es un sabado, deseo transformarla al lunes 5/12/2022 que es dia habil
el 15/10/2022 es un sabado, deseo trasnformarla al siguiente dia habil, es decir, martes 18/10/2022 y asi con cada fecha que se encuentre en un dia no habil para que pase a un dia habil
El dia viernes 5/08/2022 al siguiente dia habil lunes 8/08/2022
13/08/2022 al siguiente dia habil martes 16/08/2022
viernes 12/08/2022 al siguiente dia habil que es martes 16/08/2022
Y asi con cualquier fecha que presente esta observación
Quedo atenta si alguien conozca la manera de hacer dicho cambio
Solved! Go to Solution.
Hi @Anonymous ,
Please try:
Measure =
VAR _a =
CALCULATE (
MIN ( 'Date'[Date] ),
FILTER (
ALL ( 'Date' ),
[Date] > MAX ( 'Date'[Date] )
&& WEEKDAY ( 'Date'[Date], 2 ) < 6
)
)
RETURN
IF ( WEEKDAY ( MAX ( 'Date'[Date] ), 2 ) > 5, _a, MAX ( 'Date'[Date] ) )
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Please try:
Measure =
VAR _a =
CALCULATE (
MIN ( 'Date'[Date] ),
FILTER (
ALL ( 'Date' ),
[Date] > MAX ( 'Date'[Date] )
&& WEEKDAY ( 'Date'[Date], 2 ) < 6
)
)
RETURN
IF ( WEEKDAY ( MAX ( 'Date'[Date] ), 2 ) > 5, _a, MAX ( 'Date'[Date] ) )
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , Check if this can help
Power BI- Show Weekend data on Monday or Friday: https://youtu.be/ha71XAfntkQ