Forum Discussion
DATEDIFF between two different tables not working
Hi,
first some context: I'm working with a big dataset I can't modify (can't create columns) so I have to work only with measures. I've been working with DAX only for a couple months so probably I'm making a silly mistake, but I can't see it.
I made this measure and it works as I need it.
What am I missing? Thanks!
FGN , Try like
Venta Inn =
CALCULATE(
[Venta Total],
MaterialComercial[Atributo_1]="x",
Filter('Venta y Presupuesto' ,DATEDIFF(RELATED(Material [Fecha_de_creacion_del_registro]),'Venta y Presupuesto'[Fecha],YEAR)<=4)
)make sure the join is active
2 Replies
- amitchandakSuper User
FGN , Try like
Venta Inn =
CALCULATE(
[Venta Total],
MaterialComercial[Atributo_1]="x",
Filter('Venta y Presupuesto' ,DATEDIFF(RELATED(Material [Fecha_de_creacion_del_registro]),'Venta y Presupuesto'[Fecha],YEAR)<=4)
)make sure the join is active
- FGNNew Member
Thank you! I tryed it and it worked. Rigth now I don't undestand why but I'm sure a little nice reading will reveal the magic.