2 Replies Latest reply on Sep 24, 2018 12:27 PM by Arun Kumar

    Consecutive Days calculation help

    Arun  Kumar

      Hi,

      I want to find out from today's  (9/5/2017) Item and also going back from today to find out how many days it showed up consecutive for the same site and same product.

       

      This is the raw data:

        

      DateProduct IDSiteRule
      9/1/20181234MichiganFix
      9/1/20184444MichiganFix
      9/1/20182323MichiganFix
      9/1/20183333MichiganFix
      9/2/20182222MichiganFix
      9/2/20183333MichiganFix
      9/3/20183333floridaFix
      9/3/20181234MichiganFix
      9/4/20181234OhioFix
      9/4/20183333floridaFix
      9/4/20184444TexasFix
      9/4/20185555MichiganFix
      9/4/20186666OhioFix
      9/4/20188888MichiganFix
      9/5/20181234OhioFix
      9/5/20183333floridaFix
      9/5/20184444TexasFix
      9/5/20185555OhioFix
      9/5/20186666MichiganFix
      9/5/20187777OhioFix

       

      And based on the table this is what i want the results to show up:

           

      Today9/5/2017
      Product IDSite# of days open
      7777Ohio1
      6666Michigan1
      5555Ohio1
      4444Texas2
      3333Florida3
      1234Ohio2
      For todays item, From Today I want to find out how many days it showed up consecutive for the same site.