cancel
Showing results for
Did you mean:

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

Regular Visitor

Hello power bi team,

Can you please give me some help on the following

I want to create a measure that calculates the total cost of the last day of the previous month of the previous year, but in the ENDOMONTH function more specifically in the DATEADD function, I get the error "A function DATEADD has been used in a True/False expression that is used as a table filter expression. This is not allowed".

How can I solve that?

1 ACCEPTED SOLUTION
Super User

=
CALCULATE (
[Costo Total],
'Dim Fecha'[Date] = EOMONTH ( 'Calidad Inventario'[Fecha Cargue], -12 ),
ALL ( 'Dim Fecha' )
)

2 REPLIES 2
Super User

=
CALCULATE (
[Costo Total],
'Dim Fecha'[Date] = EOMONTH ( 'Calidad Inventario'[Fecha Cargue], -12 ),
ALL ( 'Dim Fecha' )
)

Super User

=
CALCULATE (
[Costo Total],
'Dim Fecha'[Date] = EOMONTH ( 'Calidad Inventario'[Fecha Cargue], -12 ),
ALL ( 'Dim Fecha' )
)