cancel
Showing results for 
Search instead for 
Did you mean: 

Updating one column values with another column values

Former Member
0 Kudos

Hello all,

Need some help from you, we have developed a report which populates the 2 (or more) line items with same document id, one line item has positive amount and other (s) has negative amount.

Report has other fields like A, B C etc, all the columns except B are populating with values from the Universe. Use wants column B to populate with the values from column A but in a reverse order, i.e. the value from + line item should populate in -ve line item and columns A's value for -ve line item should be populated in column B's +ve line item.

Ex: For document id 1234, there a re 2 line items with Column A values are W1 for a -ve amount and W2 for positive amount. Column B is empty, user wants W1 in + line item and W2 in -ve line item in column B.

please see the attached screenshot for more details.

Thanks,

Aravind.

Accepted Solutions (0)

Answers (1)

Answers (1)

amitrathi239
Active Contributor
0 Kudos

try this.

=If(IsNull(Previous([Name]))) Then Last([Name]) In ([ID]) Else Previous([Name])

Former Member
0 Kudos

Hi Amit, thanks for the quick response and the solution. it really helped but one more issue is, if the ID has only positive amounts then the new column (in your screenshot) should be blank or empty.

Also, if the account has more than one -ve line items, and one +ve line item, the Column B is updated with same value (for -ve line item) as columns A

please see the attached screenshot.

amitrathi239
Active Contributor
0 Kudos

This is for your null values.For positive numbers count where greater then 2 will check tomorrow.or may be someone else reply.

=If(Count([Name] In ([ID]))=1 And [Amount]>0) Then "" ElseIf(IsNull(Previous([Name]))) Then Last([Name]) In ([ID]) Else Previous([Name])

Former Member
0 Kudos

Amit, it helped but not all the lines are updated correctly. G001 should be in the last line and S030 should be line 2 and 3 under column B.