4 Replies Latest reply on Jun 27, 2012 8:39 AM by Brian Near

    "x of y" on marks of graph

    Brian Near

      A newbie issue, no doubt..

       

      I'm trying to create a formula to put "x of y" , e.g. "145 of 200", 20 of 200", "35 of 200" as labels on my graphs, and I can't figure out how to get the total number of records for the current view.

       

      I tried this:

      "str(sum([Number of Records]))+ " of " + str(TOTAL(SUM([Number of Records])))"

      but of course that gives me the total number of records for the table, not the current view.

       

      Can someone please enlighten me. labels.jpg

        • 1. Re: "x of y" on marks of graph
          Tracy Rodgers

          Hi Brian,

           

          Are there hidden members in the view? If there are, the total number of records is going to reflect them, unless they are filtered out. If not, then where is 200 coming from? Maybe can you post a workbook (twbx file)?

           

          -Tracy

          1 of 1 people found this helpful
          • 2. Re: "x of y" on marks of graph
            Brian Near

            I'm feeling somewhat dumb now.   The number shown is, in fact, the  total for the entire view.  I should've included the whole screen shot.

             

            The view is showing 2 days worth of data, and the TOTAL for the two days is shown (4,122). 

             

            I'll have to limit the view to a single date period (week of the month), unless there's a way to edit the formula to reflect the week.

             

             

            labels2.jpg

            • 3. Re: "x of y" on marks of graph
              Tracy Rodgers

              Hi Brian,

               

              To get the total of each week, the way that the calculation is being computed will need to be edited. Right click on the calculation on the label shelf and select Edit Table Calculation. Then, under Compute Using, select Advanced... Place Week, then Month and Completion Code into the Compute Using box and click OK. In the following dialog box, place Completion Code in At the level and Week in Restarting every. (This should work, although it may need to be altered based on your view)

               

              Hope this helps!

               

              -Tracy

              • 4. Re: "x of y" on marks of graph
                Brian Near

                Tracy Fitzgerald wrote:

                 

                Hi Brian,

                 

                To get the total of each week, the way that the calculation is being computed will need to be edited. Right click on the calculation on the label shelf and select Edit Table Calculation. Then, under Compute Using, select Advanced... Place Week, then Month and Completion Code into the Compute Using box and click OK. In the following dialog box, place Completion Code in At the level and Week in Restarting every. (This should work, although it may need to be altered based on your view)

                 

                Wow, excellent.  Thank you Tracy! 

                This is definitely going into my tips and tricks doc file.

                1 of 1 people found this helpful