Forum Discussion
FGN
3 years agoNew Member
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...
- 3 years ago
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
amitchandak
3 years agoSuper 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
FGN
3 years agoNew 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.