Forum Discussion

aarikc17's avatar
aarikc17
Advocate I
8 years ago

Previous INPUTED Date Count

I am trying to count the rows in a table that contain the previous INPUTED date (sometimes there are weekend dates, and sometimes there isn't).

 

A normal previous date function would work for Tuesday - Friday, but Monday would be off (Data sometimes has values for Saturday, sometimes not)

 

Anyone have an idea?

19 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi aarikc17,

     

    Please provide more detailed information to help use clarify your requirement.
    For instance:
    Sample data, screenshots, calculate steps,...

     

    Regards,

    Xiaoxin Sheng

    • aarikc17's avatar
      aarikc17
      Advocate I
      Date of Report Ran9/18/2017   
         UnitsStart Date
      Units Started Previous Day8 Widget19/16/2017
         Widget29/16/2017
         Widget39/16/2017
         Widget49/16/2017
         Widget59/16/2017
         Widget69/16/2017
         Widget79/16/2017
         Widget89/16/2017
           
      Date of Report Ran9/19/2017   
         UnitsStart Date
      Units Started Previous Day9 Widget19/18/2017
         Widget29/18/2017
         Widget39/18/2017
         Widget49/18/2017
         Widget59/18/2017
         Widget69/18/2017
         Widget79/18/2017
         Widget89/18/2017
         Widget99/18/2017
      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi aarikc17,

         

        For your scenario, I think you can try to find out the last date, then use it to filter and calculate the related records.

        Sample measure= 
        var checkdate=Today()
        var last_date=MAXX(FILTER(ALL('Table'),[Date]<checkdate),[Date])
        return
        COUNTROWS(FILTER(ALL('Table'),[Date]=last_date))

         

        Regards,

        Xiaoxin sheng