我正在尝试通过使用 Excel Power Query 创建老化桶分析。
到目前为止,我已经创建了一个列来计算每条记录的年龄。我目前正在进行的步骤是将每条记录分类到年龄桶中,例如“逾期 31-60 天”等。这是通过使用具有以下公式的自定义列来完成的:
=if [Payment Due Date] >180 then "over 180 days due" else if [Payment Due Date] <= 180 and [Payment Due Date] > 150 then "151-180 days overdue" else if [Payment Due Date] <= 150 and [Payment Due Date] > 120 then "121-150 days overdue" else if [Payment Due Date] <= 120 and [Payment Due Date] > 90 then "91-120 days overdue" else if [Payment Due Date] <= 90 and [Payment Due Date] > 60 then "61-90 days overdue" else if [Payment Due Date] <= 60 and [Payment Due Date] > 30 then "31-60 days overdue" else if [Payment Due Date] <= 30 and [Payment Due Date] > 0 then "1-30 days overdue" else if [Payment Due Date]<= 0 and [Payment Due Date] > -30 then "1-30 days overdue" else if [Payment Due Date] <= -30 and[Payment Due Date] and [Payment Due Date] > -60 then "31-60 days overdue" else if [Payment Due Date] <= -60 and [Payment Due Date] > -90 then "61-90 days overdue" else if [Payment Due Date] <= -90 and [Payment Due Date] > -120 then "91-120 days overdue" else if [Payment Due Date] <= -120 and [Payment Due Date] > -150 then "121-150 days overdue" else if [Payment Due Date] <= -150 and [Payment Due Date] > -180 then "151-180 days overdue" else if [Payment Due Date] <= -180 then "over 180 days overdue" else 0
但我收到以下错误:Expression.Error: *We cannot apply operator < to types Number and Date. Details: Operator=< Left=180 Right=5/3/2021*
这里有一些图片供您评估
错误消息
自定义列公式视图