Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Fecha de fin de semana en DAX

Hola expertos de Power BI,

Tengo algunos problemas para crear la fecha de fin de semana que termina el viernes y contiene fechas del último sábado al viernes usando Dax. Por ejemplo, cualquier fecha del 07/11/2020 al 07/17/2020 debe tener la fecha de finalización de la semana como 07/17/2020; cualquier fecha del 07/18/2020 al 07/24/2020 debe tener una fecha de fin de semana como 07/24/2020, etc. Realmente agradecería mucho su ayuda porque he estado atascado en estos últimos días.

3 REPLIES 3
Anonymous
Not applicable

@Greg_Deckler @V-pazhen-msft

¡Muchas gracias por su ayuda!

V-pazhen-msft
Community Support
Community Support

@NickNguyen

No estoy seguro de que desee una columna o medida, pruebe ambos.

Column = CALCULATE(MIN([Date]),FILTER('Table',WEEKDAY([Date],2)=5 && [Date]>=EARLIER('Table'[Date])))

Measure = CALCULATE(MIN([Date]),FILTER(ALL('Table'),WEEKDAY([Date],2)=5 && [Date]>=MAX('Table'[Date])))

column and measure of weekfir.JPG

Paul Zheng _ Equipo de apoyo de la comunidad
Si este post ayuda, entonces considera Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

Greg_Deckler
Super User
Super User

@NickNguyen - Prueba esto: https://community.powerbi.com/t5/Quick-Measures-Gallery/Week-Ending/m-p/389293#M120


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.