Forum Discussion

FabricGuy's avatar
FabricGuy
Microsoft Employee
6 years ago
Solved

DAX Help needed

Hi   I am struggeling with a DAX function and hope somebody can help me. I have three different tables (M, P, R). In my R table I have a timestamp for every ID. In my P table I have a timestamp as ...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi,

     

    I assume that you want to Create this Difference in the R Table which contains of all Unique Values. You would need to add a new column with the below Expression. This would Calculate the MIN Date from the P Table for its Corresponding ID in R Table.

    Min_Date:=DATEDIFF(DATE(YEAR(R[Timestamp]), MONTH(R[Timestamp]),DAY(R[Timestamp])),
    CALCULATE(MIN(P[Time_Stamp]), TREATAS(VALUES(R[ID]), P[ID] )),DAY) 

    Best Regards,
    Vignesh M

    If what I suggested worked for you feel free to Drop a "Kudos" and Consider to "Accept as Solution" if I solved your Issue :)