i cant proceed futher as my evaluation is not the expected result so far
i am expecting a 0 not a -1
-1 means not needed 0 means missing
i am getting a -1 as the result
brokeryear1 is 1/1/2021, brokeryear2 is 1/1/2022, adjusted broker approval is 1/1/2022
broker start date is 1/1/2022, year2dateend is 12/31/2022
it seems to be broke at the red statement.
what did i do wrong in the evaluation?
i am expecting a 0 not a -1
-1 means not needed 0 means missing
i am getting a -1 as the result
brokeryear1 is 1/1/2021, brokeryear2 is 1/1/2022, adjusted broker approval is 1/1/2022
broker start date is 1/1/2022, year2dateend is 12/31/2022
it seems to be broke at the red statement.
what did i do wrong in the evaluation?
Rich (BB code):
= Table.AddColumn(#"Changed Type10", PTMYear2Count, each if Record.Field(_, BrokerYear1) = null then -1 neither are null so this isnt where the error is
else if Record.Field(_, BrokerYear2) = null then -1 it is not null it says 1/1/2022
else if [Adjusted Broker Approval] < Record.Field(_, BrokerYear2)then -1 why is this failing 1/1/2022 is not less than 1/1/2022? it should have passed this step and moved to the next if
else if [PTM Date] = null and [Broker start date] >= Record.Field(_, BrokerYear2) and [Broker start date] <= Record.Field(_, Year2DateEnd)then 0
else if [PTM Date] <> null and Record.Field(_, BrokerYear1) <> null and Record.Field(_, BrokerYear2) <> null and [PTM Date] >=Record.Field(_, BrokerYear1) and [PTM Date]<Record.Field(_, BrokerYear2) then 1
else 0)