Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Date Formula

Hello!

 

I am trying to figure out a formula but I can't seem to get it right.

 

I have two tables that have two different types of calls. One is showing Hardware Calls and the other is showing our In House Providers calls. Both tables have a Store Number, Call Date, and a Completion Date.

 

I want the formula to say if the Hardware Call Date< ( is before) In House provider Completion Date and the Hardware Completion Date> (is after) in house provider Completion Date, return the number 1.

 

I am trying to find out how many times the in house provider would have been able to complete hardware calls at that particular store (missed opportunity). The struggle I am running into is that these are in two different tables, the common value would be the store number in both tables. Everything I try to do this I get the error code saying there are multiple values where a single value is expected. Any help would be appreciated! Thanks!

 

 

  • v-yingjl's avatar
    v-yingjl
    5 years ago

    Hi Anonymous ,

    First as the error message show, please make sure the data type of both of your two dates columns which are used to compare are date type.

     

    In addition, if you want to use 'AND' condition in the if statement, it should be '&&' instead of '&', '&' is used to combine two columns.

     

    Best Regards,
    Community Support Team _ Yingjie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

5 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      • v-yingjl's avatar
        v-yingjl
        Community Support

        Hi Anonymous ,

        First as the error message show, please make sure the data type of both of your two dates columns which are used to compare are date type.

         

        In addition, if you want to use 'AND' condition in the if statement, it should be '&&' instead of '&', '&' is used to combine two columns.

         

        Best Regards,
        Community Support Team _ Yingjie Li
        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.