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

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.

Reply
Stewwe
Helper I
Helper I

Indicador de tendencia: los últimos siete días laborables

Hola comunidad PowerBI,

Me gustaría comparar las ventas de los últimos siete días laborables con las ventas de los últimos siete días hábiles antes para crear un indicador de tendencia.

Para su información: Tengo una tabla de fechas en la que cada día laborable está marcado.

¡Espero su ayuda!

Stewwe

1 REPLY 1
v-lili6-msft
Community Support
Community Support

hola @Stewwe

Puede utilizar esta lógica para crear la medida

Measure  = 
var _last7date= MINX(TOPN(7,FILTER(ALL('Date'),'Date'[Daytype]="working day"&&'Date'[Date]<MAX('Date'[Date])),[Date],DESC),[Date]) return
CALCULATE(SUM('Table'[Qty]),FILTER(ALL('Date'),'Date'[Date]=_last7date))

Si todavía tiene el problema, comparta el archivo pbix de ejemplo y la salida esperada.

saludos

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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