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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
Anonymous
Not applicable

Filtrar datos de las x semanas anteriores (de lunes a domingo)

Hola a todos

Cuando filtro el número de semanas anteriores en Consulta, Power BI tarda una semana como de domingo a sábado. ¿Hay alguna manera de establecerlo o cambiarlo para que Power BI lea una semana como de lunes a domingo? Gracias de antemano por la ayuda

Saludos

2 REPLIES 2
v-deddai1-msft
Community Support
Community Support

Hola @7ea8ea ,

Puede crear una columna por WEEKNUM:

WEEKNUM = WEEKNUM('Table'[Date],2)

La semana comienza el lunes. Los días laborables están numerados del 1 al 7.

Y puede usar measure como a continuación para filtrar el número de semanas anteriores.

Measure = CALCULATE(SUM('Table'[column]),FILTER('Table','Table'[WEEKNUM] = WEEKNUM(Today())- selectednumber)))

Si este post ayuda, entonces considera Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

Saludos

Dedmon Dai

amitchandak
Super User
Super User

@7ea8ea , Crear una tabla de fechas con columnas Week como estas

Nuevas columnas

Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)
Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)	

Nuevas medidas

This Week = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])))
Last Week = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-1))
Last year Week= CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=(max('Date'[Week Rank]) -52)))

referencia Power BI — Semana a semana y WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors