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 BUENAS NOCHE, ESTOY TRABAJANDO EN LA DIMENSIÓN TIEMPO, Y NECESITO QUE LA SEMANA DEL MES EMPIEZE EN EL PRIMER DIA HABIL DEL MES (NO SABADO NI DOMINGO), TENIENDO EN CUENTA QUE ALGÚN MES COMO ABRIL (EL PRIMER DÍA CAE SABADO) PARA ESOS CASOS LA PRMERA SEMANA DEL MES DE ABRIL DEBERIA ENPEZAR EL LUNES, POR FAVOR ESPERO SU GRAN AYUDA.
Hi @Rommel,
You can try to use below formula to find out ther find monday of each month.
Sample table:
Formula:
Calculate column version: First Monday = MINX ( FILTER ( ALL ( 'Table' ), FORMAT ( [Date], "mm/yyyy" ) = FORMAT ( EARLIER ( 'Table'[Date] ), "mm/yyyy" ) && WEEKDAY ( [Date], 2 ) = 1 ), [Date] ) Measure version: First Monday = MINX ( FILTER ( ALL ( 'Table' ), FORMAT ( [Date], "mm/yyyy" ) = FORMAT ( MAX( 'Table'[Date] ), "mm/yyyy" ) && WEEKDAY ( [Date], 2 ) = 1 ), [Date] )
Result:
Regards,
Xiaoxin Sheng
Hola Xiaoxin Sheng,
No tengo problemas para identificar el dia de la semana, lo que quiero es que si el primer dia de la demas que comience el domingo o sabado este se considere como parte de la semana en curso y no me considere como una semana aparte por ejemplo el mes de Abril tenemos:
Actual
01/04/2017 - SEMANA 01 (Domingo)
02/04/2017 - SEMANA 01 (Sabado)
03/04/2017 - SEMANA 02 (Lunes)
04/04/2017 - SEMANA 02 (Martes)
Propuesto - Solucion
01/04/2017 - SEMANA 01 (Domingo)
02/04/2017 - SEMANA 01 (Sabado)
03/04/2017 - SEMANA 01 (Lunes)
04/04/2017 - SEMANA 01 (Martes)
Espero me puedas ayudar muchas gracias.
Hi @Rommel,
>>No tengo problemas para identificar el dia de la semana, lo que quiero es que si el primer dia de la demas que comience el domingo o sabado este se considere como parte de la semana en curso y no me considere como una semana aparte por ejemplo el mes de Abril tenemos
This is the reason why I don't use weeknum function.
Actually, the formula will filter all mondays from similar year month, then return the min one of each date range.
Regards,
Xiaoxin Sheng
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 |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
129 | |
106 | |
106 | |
86 | |
72 |