?
Solved

How to force zero to display if no sum() value

Posted on 2008-11-13
3
Medium Priority
?
515 Views
Last Modified: 2012-08-13
I have a few calculation fields that are sum(amount) through some dynamic self-relationships. I am trying to get zero to display if there are no records through the relationship. I tried:

If ( (Sum (table::amount)) =/= "" ; Sum (table::amount) ; 0 )

but it did not work. How would I create a field calculation to sum through a relationship and display zero if there are no records through the relationship?
0
Comment
Question by:Eroots
3 Comments
 
LVL 9

Accepted Solution

by:
jvaldes earned 2000 total points
ID: 22957952
Try this

if (IsEmpty(sum(table::field)).0.sum(table::field))
0
 
LVL 28

Expert Comment

by:lesouef
ID: 22958802
yes funny, fm is able to force hidding 0's, but not the other way around.
I would suggest:
If(Sum(lines::qty) > 0 ; Sum(lines::qty) ; 0)
just because I don't like to test numeric fields for emptyness, but no difference expected.
0
 

Author Closing Comment

by:Eroots
ID: 31516586
I was able to get this to work right off the bat. Did not even think about using the IsEmpty function. I took a look at lesouf's suggestion, but had previously tried that and was unable to get it to work. The problem being for summaries that have no values through the relationship, there is no numerical result, it just resolves as "", jvaldes's suggestion seems to be more geared towards the type of work / relationships I am using. THanks all!
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There is a security feature on iOS devices that is nearly impenetrable when it has been activated.  This article will provide some possible solutions as well as necessary steps to take to ensure you do not end up with a locked device.
Article by: Justin
In light of the WannaCry ransomware attack that affected millions of Windows machines, you might wonder if your Mac needs protecting. Yes, it does and here is how to do it.
Users will learn how resize a batch of photos from a single command in Photoshop via Photoshop's Image Processor. Open up an Image you'd like to resize in Adobe Photoshop: Adjust the image size according to your preferences. Image > Adjustments > …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question