I have this if statement in excel sheet which I need to replicate in Alteryx
=((IF((C13>0),(IF((H13<=C13),(IF(C13=M13,0,H13)),C13)),0)))
Am I right that this in Alteryx translates to
If
C13= M13 then 0
elseif C13.> 0 and H13 <=C13
then
H13
else
C13
endif
if yes then where does last 0 goes.
Solved! Go to Solution.
Hi @Data_Alter
It would be helpful if you could share some data, but I think this would work. You will need to swap in the column names instead of cells:
If
C13= M13 then 0
elseif C13.> 0 and H13 <=C13
then
H13
elseif C13.> 0 and H13 > C13
then
C13
else
0
endif
@IraWatt Thank you so much.
I thought using the first part , I will be replicate the whole formula but I am getting stuck. Is it possible to replicate the whole thing in cell I3
@Data_Alter Column I's formula is completely different from the one you initially gave:
IF((
IF((C3>0),(
IF((H3<=C3),(
IF(C3=M3,0,H3)),C3)),0)-
IF(F3<=C3, F3, 0)+
IF(C3<0, C3, 0))<=0, 0, (
IF((C3>0),(
IF((H3<=C3),(
IF(C3=M3,0,H3)),C3)),0)-
IF(F3<=C3, F3, 0)+
IF(C3<0, C3, 0)))
Alteryx's IIF are the same as Excel If's so I just converted it that way
IIF((
IIF([LEDGER OPEN BALANCE]>0,(
IIF([DEBT 300 + DAYS]<=[LEDGER OPEN BALANCE],(
IIF([LEDGER OPEN BALANCE]=[ADJUSTMENT],0,[DEBT 300 + DAYS])),[LEDGER OPEN BALANCE])),0)-
IIF([DEBITS 300 + DAYS JOURNAL INC VAT]<=[LEDGER OPEN BALANCE], [DEBITS 300 + DAYS JOURNAL INC VAT], 0)+
IIF([LEDGER OPEN BALANCE]<0, [LEDGER OPEN BALANCE], 0))<=0, 0, (
IIF(([LEDGER OPEN BALANCE]>0),(
IIF(([DEBT 300 + DAYS]<=[LEDGER OPEN BALANCE]),(
IIF([LEDGER OPEN BALANCE]=[ADJUSTMENT],0,[DEBT 300 + DAYS])),[LEDGER OPEN BALANCE])),0)-
IIF([DEBITS 300 + DAYS JOURNAL INC VAT]<=[LEDGER OPEN BALANCE], [DEBITS 300 + DAYS JOURNAL INC VAT], 0)+
IIF([LEDGER OPEN BALANCE]<0, [LEDGER OPEN BALANCE], 0)))
Just noticed I've updated my Answer @Data_Alter, that is a scary amount of IF statements 😅
Thanks @Ira , you are a star. I didn't know IIF statement is same as excel.
No worries @Data_Alter ! 😄