Forum Discussion

rgalvez's avatar
rgalvez
Frequent Visitor
3 years ago
Solved

DAX for earliest value

Hello experts! My dataset is built of three tables: Users, Mastery and Exams. The Users table is the link (one-to-many relation) between Mastery and Exams tables, as follows:   The expected...
  • amitchandak's avatar
    3 years ago

    rgalvez , a new column based on what I got

     

    diff =

    var _max = maxx(filter(Table, [Rep Id] = earlier([Rep id])  && [Intial Date] < earlier([Intial date]) ), [Intial  Date])

    return

     maxx(filter(Table, [Rep Id] = earlier([Rep id])  && [Intial Date] =_max ), [Score]) - [Score]

     

    Power BI DAX- Earlier, I should have known Earlier: https://youtu.be/CVW6YwvHHi8