Forum Discussion

hakimissimo's avatar
hakimissimo
Regular Visitor
9 years ago
Solved

Comparing two dates from different tables

Hello,   Very beginner with PowerBI, i'm trying to compare two dates to determine some elapse time.   two tables : incidents and incident-sla   The tables have a relationship based on incident ...
  • richbenmintz's avatar
    richbenmintz
    9 years ago

    upload to onedrive and include a link

  • richbenmintz's avatar
    richbenmintz
    9 years ago

    Hi hakimissimo,

     

    I have fixed your Calc for you and uploaded a new file to the share you created.

     

    Steps:

    - Change relationship direction from 'both' to 'single'

    - updated the formula to the following, which returns the max('incident-sla'[Start time]) where the 'incident-sla'[Number] = 'Incidents'[Number].

     

     

    BeforeAck = CALCULATE(max('incident-sla'[Start time]), FILTER('incident-sla', 'incident-sla'[Number] = 'Incidents'[Number]))

    - Add a Table visual that show how the max value is returned for each rown in the header and detail tables