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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
hassanemam
Regular Visitor

DAX: El uso de la medida de fecha como filtro en otra medida no devuelve el valor esperado

Estoy creando un informe de Power BI que necesita hacer lo siguiente

1 extraer la última fecha en la que la suma de los valores EV es mayor que La PV acumulada

así que creé una medida para **bleep** PV de la siguiente manera

PV = CALCULATE(SUM(Planned[Value]),
Filter(
ALLSELECTED(Planned), 
Planned[Dattes]<= MAX(Planned[Dattes])))

Y la última medida de fecha como

EqDates = CALCULATE(LASTNONBLANK(Planned[Dattes], Planned[Dattes]), FILTER(ALL(Planned), [**bleep** PV] <= SUM(Activities[EV])))

2 Ahora quiero crear otra medida que calcule el valor de coste acumulado hasta el EqDates calculado en el paso anterior

Creé la siguiente medida

PV1 = CALCULATE(SUM(Planned[Cost]), FILTER(ALLSELECTED(Planned), Planned[Dattes] <= MAX(Planned[Dattes]) && DATEVALUE([EqDates]) >= Planned[Dattes] ))

Pero no devuelve el valor esperado. Básicamente el EqDates tiene un valor de 24 de marzo de 2020, el valor acumulado PV1 deja de incrementarse el 26 de marzo de 2019 (alrededor de un año antes). parece que el filtrado usando EqDates en PV1 no funciona.

¿Algún consejo sobre lo que estoy haciendo mal?

1 REPLY 1
V-pazhen-msft
Community Support
Community Support

@hassanemam

Intente reemplazar :

EqDates - CALCULATE(LASTNONBLANK(Planned[Dattes], Planned[Dattes]), FILTER(ALL(Planned), [**bleep** PV] <-SUM(Activities[EV])))

Con:

EqDates á CALCULATE(LASTNONBLANK(Planned[Dattes], Planned[Dattes]), FILTER(ALL(Planned), [**bleep** PV] <-SUMX(ALL(Activities),[EV])))

Paul Zheng
Si este post ayuda, por favor considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

Helpful resources

Announcements
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 Kudoed Authors