Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cash Flows-positive and negative amounts

I have a cash flow table with positve and negative data in the amount field. Does this type of data require special handling. I seem to loose data when I list it if the record has a positive and negative amount for the same time period.

14 Replies
villafuerte
Partner Ambassador
Partner Ambassador

What expression are you using?

If you only have

=Amount

and QlikView finds several Amounts for that period it won't show them.

If this is the case, use something like this:

=sum(Amount)

Not applicable
Author

I tried it both ways. When I did =Amount what you describe happened. I have a field NDATE in the table it contains for example 12/1/2010 and 12/31/2010. When I did =Sum(Amount) I everything showed a 12/1/2010 date.

BTW thanks for your help.

villafuerte
Partner Ambassador
Partner Ambassador

If you have positive and negative values maybe the problem is this: for the NDATE 12/31/2010 the result for =sum(Amount) is zero.

So, if you have these values:

12/31/2010 - +5

12/31/2010 - +5

12/31/2010 - -10

The record won't appear because the sum is 0.

Maybe you can attach a file with an example or you explain a bit about the requirement we can try to find another way to represent it.

Cheers

Not applicable
Author

I dont it sum to 0. I didn't see how to attach a file so I pasted it into the message below. It shows how it shows up in Qlikveiw, How it appears in the origianl database. My load statement for the table and the expression I am using.

Not applicable
Author

[Post deleted at author's request]

villafuerte
Partner Ambassador
Partner Ambassador

The problem here is that QlikView does not recognize (1000) as a negative number, but as a string. That's why it ignores the negative values.

Let me check if I can get a simple solution for this. GIve me 5 min

Miguel_Angel_Baeyens

Hello,

If you get negative values from your database formatted with "(XXX)", you can use a format to let QlikView know that those values are negative:

=Num#(Num('(1000)', '#.##0;(#.##0)'))


Should show "-1000". In the format part, at the left is how you want to represent positive values and at the right the negative.

Hope that helps.

villafuerte
Partner Ambassador
Partner Ambassador

Miguel has a great solution, I also managed to change this format in the script.

It should work either way.

Cheers!

Not applicable
Author

Thanks to both. I will try the fix.