Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
Hi itaymaor82,
just for interest, what is your expression approach using Rank()? That was also one of my first ideas..
Try this:
=aggr(NODISTINCT RowNo(),CURR)
if CURR is the fieldname of your currencies.
Hope this helps,
Stefan
Hi itaymaor82,
just for interest, what is your expression approach using Rank()? That was also one of my first ideas..
Try this:
=aggr(NODISTINCT RowNo(),CURR)
if CURR is the fieldname of your currencies.
Hope this helps,
Stefan
It works! Thanks so much!