Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Create new column with negative and positive amounts

Hi

I have excel files with example like below:

   

TimeTypeAmountBalance
10:01D100100
10:02D50150
10:03C10050


I need to identify the negative (D) amounts in able to create correct Running Balance in my application.

My idea is to create a new column to create a running balance the will show me the running balance so i can identify the correct MAX and MIN.

   

TimeTypeAmountNew AmountBalance
10:01D100-100-100
10:02D50-50-150
10:03C10010050
1 Solution

Accepted Solutions
marcus_sommer

Just create a flag within the load with something:

if(Type = 'D', -1, 1) as Flag

and then you could multiply with it in the expresions, for example:

sum(Amount * Flag) // within the Balance expression

- Marcus

View solution in original post

1 Reply
marcus_sommer

Just create a flag within the load with something:

if(Type = 'D', -1, 1) as Flag

and then you could multiply with it in the expresions, for example:

sum(Amount * Flag) // within the Balance expression

- Marcus