7 Replies Latest reply on Apr 18, 2013 10:05 PM by july1962

    Need help with calculation

    july1962

      Title

      Need help with calculation

      Post

           At least I think it would be a calculation.

           I have a file setup to track my sales. I have a layout that is just a running order of the transactions and I sort them into paid and unpaid. I'd like to have two boxes at the bottom that gives me the total for each, but I'm not sure how to set it up. 


           I assume I'd set up two fields, a paid and an unpaid. From there I'm stuck.

        • 1. Re: Need help with calculation
          schamblee

               Each order would have  a status field. Paid / Unpaid.   You also have a summary field of your order totals.  Create a globle field of the type of orders you want to view Paid / Unpaid, and set a relationship between this field and the status field.  Display your summary field based on this relationship and total would show paid / unpaid which ever you have your status field set too.   You could have 2 global field to show both totals at same time if need.  Also your Global field could be a popup menu to select paid/unpaid.

          • 2. Re: Need help with calculation
            july1962

                 Yikes...that was like swahili to me! I guess I should have mentioned I'm an amateur. I don't know what a global field is, or relationships.

                 Is there no way to do this more simply? I thought I could just have two fields that would look up the records based on the paid/unpaid status and total it. 

            • 3. Re: Need help with calculation
              schamblee

                   This is about as simple as it gets.  The best way to learn is to put into practice.  There are a lot of great books about filemaker online and filemaker come with starter solutions that you can view and learn from. 

              • 4. Re: Need help with calculation
                philmodjunk

                     There are multiple ways to do this.

                     The simplest to explain is to add 4 fields (plus the status field that shows paid or unpaid) to your table.

                     Define a field, cPaidAmount, of type calculation:

                     If ( status = "Paid" ; Amount )

                     This field will be empty if status is unpaid.

                     Define cUnpaidAmount as:

                     If ( Status = "UnPaid" ; Amount )

                     Then define to summary fields, sTotalPaid and sTotalUnpaid to compute your two totals.

                     Define sTotalPaid as a summary field that computes the total of cPaidAmount. Define sTotalUnpaid to compute the total of cUnpaidAmount.

                     These summary fields will compute totals over all records in your found set. Perform a find for just a certain group of records, such as all records for the Month of April, 2013 and these fields will compute just the totals for that month.

                • 5. Re: Need help with calculation
                  july1962

                       @ S Chamblee I actually figured it out on my own and it was much simpler than what you wrote. I think it was more like what PhlModJunk wrote, but I'm not exactly sure. 

                       I just created one field  called "paid unpaid total." I then created a sub summary section by the "paid unpaid" amount and put it in there. Now when I sort by paid unpaid", it separates the page into paid at the top, unpaid at the bottom with a total for each. 

                       The problem with learning is that you have to understand what you're being taught in the first place. You can't give someone who doesn't speak Spanish, an entire sentence in Spanish and expect them to know what to do with it. 

                  • 6. Re: Need help with calculation
                    schamblee

                         I gave you exact insturctions.  Phil gave you a different method.  Both gets the results, I perfer the method I gave you.  My insturctions are simple, you just have to want to use them.   Setting up a global field or create a relationship as metion above is simpe as it get in filemaker.  Sorry I tried to help.

                    • 7. Re: Need help with calculation
                      july1962

                           I'm sure you did give exact instructions, but if the person needing the help doesn't understand the terms you use or the instructions, it's useless I'm sorry you refuse to understand that.  And if I didn't want to use your instructions I would have just ignored them, not asked for clarification.  You need to learn that just because you're proficient in FileMaker doesn't mean everyone else is. I appreciate the offer of help, but not the put down.