2 Replies Latest reply: Nov 25, 2013 4:05 AM by M Paeper RSS

    Show last / most recent plotted expression value on chart?

    M Paeper

      For some reason my post on the same topic yesterday appears to not have made it through moderation so am trying again.


      Given a typical chart, below I wish to show the data value on the chart but only for the most recent / right-hand-most record displayed - e.g. I want to see something like the yellow highlighted areas below, either approach will do for me.

      2QlikView x64 - [X__40 MODELS_WIP-MarkerEfficiency-test.qvw_]_2013-11-21_12-50-13.png

      I know Expressions -> Values on data points exists but as you know this shows all values and on narrow bars is effectively illegible for my purposes.


      I tried adaptations of Qlik Tips: Lose the Legend in Line Charts

      where use of the Values on data points feature is used with a formula along these lines:

      Dual( If(MonthYear=Max(total MonthYear), CategoryType, ''), Sum(Sales) )


      I've tried various approaches using my fields and tables but am not getting the expression field value to display. I'm just getting either Null or the dimension value to plot.


      Using a date axis on the above I couldnt get it to work, so I tried another way using firstsortedvalue in a text box but using data as the x-axis it only shows me Null. I then tried with a product/itemreference and it showed me the correct itemreference but not the value of [Marker Efficiency] at that point. I also noticed that this method worked fine in a text box but not when doing something like putting

      ='Latest Efficiency = ' & firstsortedvalue( itemReference1,-Aggr( Avg( Distinct [Marker Efficiency]),itemReference1 )) in the window or chart title, there it shows the expression text but not its evalued form.
      3BI - Evernote_2013-11-21_16-00-26.png


      Can I get firstsortedvalue to work with a date dimension on the x-axis and then display the expression (bar plot) value of the last plotted expression?


      I also tried using the Peek function but only get Nulls that way too.


      How can I achive what I'm trying to do. First graph - the yellow highlights above. Thanks