1 2 Previous Next 17 Replies Latest reply on Apr 4, 2012 12:37 PM by Stephen Huston

    Multiple lines in Y-axes




      I have a table which holds department scores for multiple departments over the 12 months of the year.


      I am trying to create a line chart with Months as the X-axes and multiple Y-axes for up to 5 different Department scores.

      If I filter my table to nly contains 1 department , I have no issue. The dept scores for each month are shown correctly over the months on the chart.


      As soon as I include another department in the table, only the first month's data appears to be shown for both departments.


      What am I doing wrong?

        • 1. Re: Multiple lines in Y-axes
          Stephen Huston

          You don't mention the type of chart you are using: bar, line, pie...


          You can set bar of line charts to either vertical or horizontal and chart multiple axes  simultaneously against the running months across the horizontal. Is this what you are trying to do, get separate values, or are you trying to get a cumulative value, similar to stacked values?

          • 2. Re: Multiple lines in Y-axes

            Hi Stephen,


            Thank you for your response.


            Yes I am using a line chart, trying to set multiple axes against the running months on the horizontal.

            I am not wanting cumulative values, just the values as that are held on the records.

            When I add a second entry on the Y axis, I get 2 lines but only one month is reflected in the Horizontal axis.


            When there is only one line on the Y axis, the months are shown correctly.




            • 3. Re: Multiple lines in Y-axes
              Stephen Huston

              Are you using field values or calculations to generate the data points?

                   If fields, make sure they are all populated. If the fields are calc fields, make sure they set to always evaluate.

                   If calcs in the chart itself, be sure they are set to always evaluate.


              Also, be sure that the data records are sorted appropriately for the chart, by month.


              If that's still not working, you are almost certainly using a calc or a calculation field for the new data point, so post that and explain it as far as possible; also make sure alls calcs' dependency fields are fully populated/always evaluated.

              • 4. Re: Multiple lines in Y-axes

                Hi Stephen,


                I have tried to explain my scenario below and in attached PDFs:


                I currently have only 2 departments (_kf_DepartmentID 8 and 10)... Grocery and Frozen in the table.

                They both have values (DeptScore) for March and April only.

                The table is sorted into kfMonthID order.


                The first Y axis is a calc field in the chart as follows:

                If (StoreDepartments::_kf_DepartmentID = 8 ; StoreDepartments::DeptScore;0)

                The second Y axis is a calc field in the chart as follows:

                If (StoreDepartments::_kf_DepartmentID =10 ; StoreDepartments::DeptScore;0)


                The chart gives me the first Y axis Dept values for Grocery correctly, but the second Y axis is = 0.

                When I try 3 departments , the same happens…only the first Y axis is correct.


                The attached Pdfs are of the  Chart and the Table.

                I am sure I m doing something really stupid, but I have tried a number of things and just cannot get it right.


                Your help is much appreciated.





                • 5. Re: Multiple lines in Y-axes
                  Stephen Huston

                  It looks like your calc will return either a value or Zero depending on the department number, but you are trying to plot 2 lines spanning only 2 months, when one of the values will be zero in each record? I am pretty sure that's part of the problem, but need more info.


                  Can you post a sample file with  sample data just for this chart?


                  Your attachments were not posted.

                  • 6. Re: Multiple lines in Y-axes

                    HI Stephen,


                    Here's the data I have used:

                    • 7. Re: Multiple lines in Y-axes

                      I have posted the attachments.


                      Do you have any ideas on a solution to generating multiple Y axes on my chart.

                      • 8. Re: Multiple lines in Y-axes
                        Stephen Huston

                        The attachments you posted are PDFs, not sample FM files where I can see the current chart for troubleshooting and testing.


                        Can you post a zipped FM file?

                        • 9. Re: Multiple lines in Y-axes

                          I have posted a zipped file of a test table and chart eflecting the issue.

                          • 10. Re: Multiple lines in Y-axes
                            Stephen Huston

                            Try the attached file.


                            You were getting the first matching value, which for some records was zero depending on how they were sorted.

                            • 11. Re: Multiple lines in Y-axes

                              Many thanks for this.

                              I did think it was to do with the way the data was grouped.


                              I will have to generate another table with the department totals set on each month as per your example.

                              • 12. Re: Multiple lines in Y-axes
                                Stephen Huston

                                The example file I sent late yesterday was just one of several ways to fix this; I did it that way because it worked with the data set you provided.


                                The issue is that you need to summarize the totals for a month by department. Your original used the first value it encountered for each calc, which was always Zero for one of the departments because the record was for the other department.


                                Among the other ways to summarize the data:

                                1. use a calculation which uses the sum when sorted by department
                                2. add a sum field for departments as separate fields
                                3. simplest but uses a different data model, have the department amounts entered in different fields in the same Month record, no calcs required, just one record per month with separate fields for each department. Similar to what I did with my new table, but for direct entry of the values instead of requiring a relationship.

                                So you have lots of choices, but you need the figures summarized by month if there is more than one record for any month.

                                • 13. Re: Multiple lines in Y-axes

                                  Can y'all see this?  I'm having issues with my FMdev acct and I tried putting up a response but keep seeing errors.




                                  • 14. Re: Multiple lines in Y-axes
                                    Stephen Huston

                                    I can see your post. Did you intend for it to go to the thread:

                                    Multiple lines in Y-axes ?

                                    1 2 Previous Next