7 Replies Latest reply on Apr 9, 2015 10:17 AM by philmodjunk

    Charting data from portal



      Charting data from portal


      Hi, i have a layout "Analysis" that contains a portal which shows the related data coming from the table "Curves". The data are simply a 5-points x,y type (x1, y1, x2, y2, etc) that i would like to plot on the same line chart in order to check how much those curves are different. I created a calculated field "X values" populated by the command List(x1, x2, x3, x4, x5) and the corresponding "Y values" field as well.

      Now i'm feeling quite stupid because i can't do it - i can only plot correctly one curve and the other related records showed in the portal are not showed as curves.

      Any help is much appreciated!

      Thank you in advance,


        • 1. Re: Charting data from portal

          When you look at this data, how do you tell which records are part of a one curve and not another?

          • 2. Re: Charting data from portal

            The table "Curves" contains a field IDAnalysis which is the key of the table "Analysis". There is a relation between "Analysis" and "Curves" using IDAnalysis.

            The table "Curves" contains also a IDcurve key that identifies the different curves.

            • 3. Re: Charting data from portal

              To sum up, if you examined your data in a portal on this layout, you'd see one set of records with a common value in IDcurve that identify them as points in the same curve. A set of records that are points from a different curve will also appear, but with a different common value in the IDcurve field?

              Note that x vs y plotting for even one curve will be problematic unless x increments in a consistent interval with no gaps due to limitations in how FileMaker charts such data. To plot two different curves, the x values will need to be the same for both series of y values also.

              If you are using FileMaker 12 or newer, you can replace your List function with ExecuteSQL() function calls and use a WHERE clause to specify a particular value for IDCurve.

              ExecuteSQL ("
              SELECT Y from \"YourTableNameHere\" WHERE IDCurve = ? Order By x " ;

              "" ; ¶ ; Specify value for ID curve here )

              • 4. Re: Charting data from portal

                Thank you Phil for the patience.
                This is what i have in the table "Curves":

                IDCurve     IDAnalysis      x1   x2   x3    x4   x5   y1   y2    y3    y4    y5

                     1                  1              0     10   20    30   40   10   40     85   110   150

                     2                  1              0     10   20    30   40    25  55     130  90     65

                I can correctly plot the first curve, but not both at the same time.

                Yes i'm using FileMaker Pro 13, but i have never used ExecuteSQL before so i need some more indication... should i put the SQL function into the "Specify Calculation" for the y values of the graph?

                Thank you again

                • 5. Re: Charting data from portal

                  To chart multiple lines, you need to define multiple Y-Series.

                  Yes, you can put this function into the calculation dialog for each Y-Series that you define. The only difference from one expression to the next is the value you put in place of "Specify value for ID curve here".

                  Also, be sure that you have specified the "delimited data" data source option.

                  • 6. Re: Charting data from portal

                    Ok, thanks.

                    Is it possible to dynamically define the number of Y-Series? I.e. the analysis n°1 has two curves, the analysis n°2 has 4 curves, etc

                    • 7. Re: Charting data from portal

                      It is not possible to change the number of series dynamically.