Forum Discussion

j_t0418's avatar
j_t0418
Frequent Visitor
9 years ago
Solved

Expression Error: < to Types Date and Number

I'm trying to add the below custom column formula to a query of mine, but am recieivng  [Expression.Error] We cannot apply operator < to types Date and Number   if [SupplierText]="X" and [Date]>= 5...
  • v-huizhn-msft's avatar
    9 years ago

    Hi j_t0418,

    In your Query statement, 5/23/17  is recognised as text, please use #date(2017,5,23). Please use the following statement, and check if it works fine.


    if [SupplierText]="X" and [Date]>= #date(2017,5,23) and [Date]<=#date(2017,6,8) and [Number]=null then 0 else if [SupplierText]="X" and [Date]>= #date(2017,5,23) and #date(2017,6,8) and [TypeText]="X" then [Number] else if [SupplierText]="X" and [Date]>= #date(2017,5,23) and #date(2017,6,8) and [TypeText]="Y" then 0 else if [SupplierText]="X" and [Date]>= #date(2017,5,23) and #date(2017,6,8) and [TypeText]="Z" then 0 else [Number2]


    Best Regards,
    Angelia