We need to see the data structure.
Could you add your packaged workbook with sample data (***.twbx)
without looking at your data, have you tried:
If ATTR([Parameter] = True and Today () >= Date ([orderDate]) + 30) then SUM ([salesAmt1]) else sum([salesAmt2]) END
Thanks Sherzodbek! -- I've tried -- w/ ATTR, the error was gone!