Jump to content

Recommended Posts

Hi Guys, 

I have two tables: 

- Companies (with Company Data)

- Transactions (with Transaction Data)

The Company ID (serial number) is liked to Transaction via a Foreign Key. So all good. 

I have a layout on the Companies Table, where I then have a Portal that lists transactions relating to that company only. Again, so far so good. 

Now, in the Transactions Table there is a number calculation/number, the Field is called Percentage Increase. 

What I want to do is in the Company Layout view have a field which is a Summary of the Percentage Increases. So if there are 5 records, the average would be over 5. 

In the Transactions Table I have made a Summary 'average of' this field. 

What I hoped would happen is by adding this field, it would give me my average in the Company Layout. 

Suffice to say it hasn't!

I guess I've done something wrong, or maybe even put the calculation in the wrong Table? 

Can anyone help :)

Thanks!

Neil 

  

 

 

Link to post
Share on other sites
2 hours ago, Neil Scrivener said:

in the Transactions Table there is a number calculation/number, the Field is called Percentage Increase. 

How exactly is this Percentage Increase field defined?

 

2 hours ago, Neil Scrivener said:

What I hoped would happen is by adding this field, it would give me my average in the Company Layout. 

Could we have a worked out example? For example, transaction records (of the same parent):

Value Change
100  
105 5.0%
115.5 10%

Average change: 7.5%

Is that what you would expect?

 

2 hours ago, Neil Scrivener said:

Suffice to say it hasn't!

No, it does not suffice. It would be much more helpful to know exactly how it failed - e.g. the result was wrong, there was no result, there was an error, or ... ?

 

Link to post
Share on other sites

Hi, 

The Percentage Increase Field is a Calculation Field. The Calculation is NumberCurrent/NumberPrevious -1. 

The field is operating fine.  

Correct on your table above, this is the answer it should give. 

When inserting the Field into my Company Layout view, it shows nothing. No figure, absolutely nothing. 

Does that help at all?  

Link to post
Share on other sites

I thought I posted a reply, but it has disappeared.

The gist of it was to ask you to post a demo file showing the problem.

 

Link to post
Share on other sites

Haha, the wonders of the internet. 

I've knocked up the attached Demo File. 

In my actual DB, the Portal in Companies lists the transactions - not sure why it's not working in this? 

But you can see in the Companies Layout (hopefully) what I'm trying to get, in the Average Increase/Decrease Field? 

Thanks!

N

Demo File.fmp12

Link to post
Share on other sites
13 minutes ago, Neil Scrivener said:

In my actual DB, the Portal in Companies lists the transactions - not sure why it's not working in this? 

Because you are populating the CompanyIDFK field with the company's name, instead of the company's ID. Thus none of the transactions are related to any company. Once you fix that, the records become related, the portal shows them and the summary field displays the correct value.

 

Demo File+.fmp12

Link to post
Share on other sites
Posted (edited)

Thank you for this, adjusted in my Demo Database and all working good. 

So, having performed the equivalent calculation in my actual database, I am getting the following information: 

Company A

Percentage Difference - Year 1 25.81%
Percentage Difference - Year 1 21.37%
Percentage Difference - Year 1 17.45%
Percentage Difference - Year 1 4.49%

Average Difference: 2,616,075.00%

So this seems to be taking an average of the entire table of data, and not 'filtering' it by the Company record that I'm in. 

Any views what could be wrong? 

Thanks!

UPDATE I've added the field to Transaction Data layout and getting a figure of 23,215,055.28%!

Now I'm really puzzled?!

UPDATE to the UPDATE, Ive changed the calculation to a "Total Of" instead of Average of, and it's giving me 69.11% - which is the above percentages added......so something is working!

Update to the update to the update: have now switched it back to Average Of, and by some magic it's working. Possibly I bug, not sure?!

Edited by Neil Scrivener
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Similar Content

    • By Todd Dignan
      I have a client that has been using a send email script step  that brings up the outlook email client on the desktop.  This as worked for years no problem.  It has stopped work on 3 of 35 computers within the last two weeks.  I talked with there IT personal and they have assured me that no updates have happened.  The actual error is -
      Microsoft Office Outlook
      Either there is no default mail client or the current mail client cannot
      fulfill the messaging request.  Please run Microsoft Outlook and set it as
      the default mail client.
       
      I have double checked with system default  and Outlook's settings.  Both are set to default.
      The client is using the latest version of office 360's and the latest version of FileMaker 18 advance. Both 64bit.
      Any suggestions are welcome.


    • By tbcomputerguy
      I have an excel sheet that controls bills of ladings for a forestry company.  In the example you can see that there is lots going on with this Bill.  It has a payperiod, mill, truck that delivered it, etc.
      I would like setup a database to monitor this.  The fields CT1, CT2, Skid1, Skid2. PROC1, PROC2 are all contractor numbers.  There are 6 contactors.  The percentages in each line are the amount of the volume they performed  In the third line there is a value in CT1 only...they get 100% of the volume.  I can figure out most of this, but am stumped on how I can monitor when a contractor does multiple jobs..ie in line one, contractor 5, cuts and skids.  All 6 contractors could be involved in one BOL. Each one of these jobs, cutting, skidding and processing each has their own respective rate of pay as well.   I think i need a way to break down each line so that I can produce pay summaries for each of the contractors.  I had started this years ago, and thought I asked in a forum, but can't remember where.  Nonetheless, they stopped using multiple contractors per load...Now they have returned, so I am back at it.  So if this is a repost from years ago I apologize.  
      Thanks in Advance
      tbcomputerguy
       
       

    • By dancer5678
      I am using Filemaker Server 18 on Windows Server 2012 R2
      Been using it for years with no issues
      Currently when I log in to the console it is very sluggish.
      When I get to the Dashboard it shows No databases, then it auto refreshes and the database list appears.
      Within 15 seconds of scrolling the database list to open files the screen refreshes. This situations is happening over and over in a loop.
      Any Thoughts on what is causing this issue?
       
       
       
       
    • By stevaroni
      I get an error 3 when using a script to Export Records via WebDirect. Using FileMaker Server 18 and have tried both Safari and Chrome both with same results. I have tried using the temporary path, desktop path, and documents path. I have tried using with the automatically open and not. I have tried writing a tab delimited and comma delimited file. Does anyone have ideas I haven't yet tried?
    • By cheerfulzebra
      Hi All
       
      I am hoping some one can help!
      I have a table called TPM, in that table is a field "Next Due Date" Which is auto generated by creating a new record. You input the date you did the service and then it adds 3 months to that date and that appears in the Next Due Date Field.. All working...
       
      What I am trying to do is when the database loads it runs a script to see if there are any outstanding TPM Services to do...
      Here is the script
      Show Customer Dialog
      Message: If ( TPM::TPM Next Due Date < Get (CurrentDate ) ; "You have outstanding TPM services" ; "You have no outstanding services")
      I thought it would be that simple. So I created a TPM Due date Less that Current date and ran the script...."You have outstanding TPM Services"...GREAT! Then I deleted that record and ran the script again...""You have outstanding TPM Services" Oh!!! That isnt true!
       
      PLEASE HELP I'M LOOSING THE WILL TO LIVE HERE!!!
  • Who Viewed the Topic


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.