Forum Discussion

FGN's avatar
FGN
New Member
3 years ago
Solved

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...
  • amitchandak's avatar
    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