Forum Discussion

twalsh0625's avatar
twalsh0625
Icon for Advocate I rankAdvocate I
9 years ago
Solved

Finding Repeated values in a table, within a date range

I have a list of cases associated with customers. Basic customer support case info included. I would like a measure in the PBIX table that checks to see if that customer account appears again, with a Case Opened date within X days of the original Case Closed date. A simple BOOLEAN result works from there... What is the easiest way to calculate this?

10 Replies

  • MattAllington's avatar
    MattAllington
    Icon for Community Champion rankCommunity Champion

    It depends on your data. please post a sample of the data model/tables of data  so someone can help.  

    • twalsh0625's avatar
      twalsh0625
      Icon for Advocate I rankAdvocate I

      Ok, bear with me:

       

      Case_ID   Customer    Open Date    Close Date

      1234        ABC             5/1/17           5/2/17

      4567        XYZ              5/9/17          5/12/17

      8888        ABC             5/3/17           5/5/17

       

       

      I would like to flag CASE_ID as a repeat issue because it is on Customer ABC with an open date that is within 7 days of the close date of another ABC case....

  • Nawaaz's avatar
    Nawaaz
    Frequent Visitor

    Thanks very much for this post and your helpful blog Matt. It reminds me, I need to continue following your book to learn DAX! All the best