2 Replies Latest reply: Oct 14, 2011 3:43 PM by itaymaor82 RSS

    Distinct numbering in chart expression

      Hi all,

       

      I’m struggling with something in QlikView and I hoped you could help me.

      I’m trying to ‘AutoGenerate’ distinct values/numbers not during the load script, but in a chart expression (the reason is that the numbering depends on the currently shown items, based on user selection, and thus cannot be calculated during the load script).

       

      For example:

      I load a table that looks like this:

      USA          USD

      Australia    AUD

      France      EUR

      Spain        EUR

      Japan        JPY

      Italy          EUR

       

      and the chart (say, straight table) should look like:

       

      USD   1

      EUR   2

      EUR   2

      AUD   3

      USD   1

      AUD   3

      EUR   2

       

      each value that is shown based on the current selection gets a unique number.

       

      How can I do that in the chart expression? Using the Rank() function got me close but not quite there.

       

      Thank you!