21 Replies Latest reply: Nov 28, 2016 11:23 PM by pooja singh RSS

    Display data point values on line chart

    MCPL MCPL

      Hi there,

       

      I have a line chart with an x-axis time series (which is updated each day with the latest information).  The user can select the point in time which they want to view the line chart or default latest update day (today).  Because of the number of value points on the line chart it is difficult to see the data values.

       

      Is it possible to restrict the data values to only the selected (latest) date?  This means there is only one value visible on the line chart (the last one).

      Have tried using the 'Show Value'  field but have not been successful.  The 'TODAY' function works only if the default value is selected (today).  Once the user selects a date prior to today the field does not show.

       

      Thanks

        • Re: Display data point values on line chart
          John Witherspoon

          Add a second expression sourced from the first, but that only establishes itself for the dates you want.  For example:

           

          TotalSales = sum(Sales)
          DisplayTotalSales = if(Date=max(total Date),TotalSales)

           

          Only display data values on the second expression.  Maybe I'm missing an easier way, though, as I don't see the "Show Value" on a line chart.  Maybe I'm just missing something, or maybe it's a v10 feature (I'm on v9).  You might be able to refer to max(total Date) in that field, or max(Date).

            • Re: Display data point values on line chart
              MCPL MCPL

              Hi John,

               

              Thanks for your response.

               

              To make it simpler to understand what I am trying to achieve here is a screenshot.  The

              Picture1.png

              If the user selects a previous date the data is shown only up to that 'selected' date.  I want the data value for the selected date to be displayed on the end of the line graph.  The screenshot above uses the 'TODAY' (REFRESH_DATE=TODAY('DD/MM/YYYY') function.  Obviously this does not work when a historical date is selected.

               

              Cheers

               

              Karl

                • Display data point values on line chart
                  Sam Grosinger

                  This is a very important question. any answer?

                    • Re: Display data point values on line chart
                      John Witherspoon

                      aryehgros wrote:

                       

                      This is a very important question. any answer?

                       

                      They're ALL very important questions.  I bet there aren't very many people on this forum posting questions out of idle curiosity.

                       

                      I answered this one.  But it appears that either I misunderstood the question, or I did understand it, and Karl and you did not understand my answer.  Or maybe my answer is wrong.  I can think of cases where it wouldn't work, but nobody has said that either.  As far as I can tell, nobody tried my answer.

                       

                      What I suggested above is looking for the maximum date displayed on the chart, and putting a value above that data point.  Karl said "the data is shown only up to that 'selected' date".  So the maximum date displayed on the chart should be the 'selected' date, and therefore only that data point should have a data value above it.  So what I suggested appears to me to be a solution to the problem.

                       

                      Karl doesn't appear to have tried that solution.  He appears to have tried using today().  I didn't suggest using today(), because "Obviously this does not work when a historical date is selected." 

                       

                      Now, in this specific case, it now appears that field "Refresh Date" contains the date for the data we want to display.  So here, you could simplify the solution I gave to this:

                       

                      DisplaySomething = if(Date="Refresh Date",Something) // display values on this expression only

                       

                      But I have no idea if I'm even answering the right question.

                    • Re: Display data point values on line chart
                      Antonio Mancini

                      Hi Karl,

                      why don't use 'show value' in Expression -> + ?

                       

                      ShowValue.png

                      Regards,

                      Antonio

                  • Re: Display data point values on line chart
                    Mark Monfort

                    Hi guys,

                     

                    Have just implemented this and I love how it is dynamic in providing me what I need. I currently use it to highlight the high, low and latest values over a specific period of time.

                     

                    Problem I have is when some values - in this example, the low values - are multiple ones. If you look at the image it shows -18 in red as the low value which happens a few months in a row.

                     

                    I want to know if there is a way to just show the latest 'low' value - ie just the latest -18.

                     

                    Currently the code that calculates the Min Values score is =if(Rank(-avg([QMG Score]))=1,avg({<Period=>}[QMG Score]))

                     

                    The dimension of the chart is just something called Period - eg 31/12/14

                     

                    QMG problem.PNG

                      • Re: Display data point values on line chart
                        Steve Dark

                        There are a number of different ways you can handle hitting the same value using the Rank function, using an extra parameter, one of these may help.

                         

                        If not you could add the period to the score, but make sure it is a secondary factor in the rank by multiplying the score, eg:

                         

                        Rank((-avg([QMG Score]) * 1000000) + Period)


                        Depending on whether you wanted the first or last point marked you could either add or remove the period value.

                         

                        Hope that makes sense.

                         

                        Steve

                      • Re: Display data point values on line chart
                        pooja singh

                        Hi,

                        Please find attached reference for your problem.

                         

                        Thanks,