Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Formula to Create New Column Based on Criteria

adamscy
6 - Meteoroid

I have a report that I created in Alteryx but need help creating a new column within the report to produce a new "Report Amount" column.  There are certain "Accounts" in the report that have amounts in the "Debit" column and others with amounts in the "Credit" column.  I would like to have a formula to create a new "Report Amount" column based off of some criteria.  I've put the information in the attached report but here is what I'm trying to do.

 

If the Account column = one of the below and there is an amount in Credit column then use Credit amount, otherwise put the negative Debit amount in the new "Report Amount" column. 

 

1.  HFM_CbCUnRelRevenue

2.  HFM_CbCRelRevenue

3.  HFM_CbC_EBIT 

4.  HFM_CbC_Capital

5.  HFM_CbC_RE

 

If the Account column = one of the below and there is an amount in Debit column then use Debit amount, otherwise put the negative Credit amount in the new "Report Amount" column. 

 

1.  HFM_CbC_TotalTax

2.  HFM_CBC_CurrentProvisionTotal

3.  HFM_CbC_TangAssets 

13 REPLIES 13
adamscy
6 - Meteoroid

Here is an example of the input file and the mappings.

Luke_C
17 - Castor

Hi @adamscy 

 

How's this? Looks like the data now has 0s instead of nulls so had to adjust for that. Maybe that was the issue all along?

Luke_C_0-1675451241772.png

 

binuacs
20 - Arcturus

@adamscy  like @Luke_C said the workflows were not running as expected because the input file has 0's instead of NULL value, I also updated the workflow  

 

binuacs_0-1675454704551.png

 

adamscy
6 - Meteoroid

Yes this worked.  Thank you!

Labels