Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

divya_anand
Contributor II

Sequential number instead of Dimension values

Hi,

I am working on a line chart which has ID on X-axis and "no of days open" on Y-axis.

I am trying to name these IDs in numbers like this-

Any idea as to how to name these IDs in numbers?

Tags (2)
1 Solution

Accepted Solutions
MVP
MVP

Re: Sequential number instead of Dimension values

This?

Capture.PNG

Exp (using sortable aggr()):

=Aggr(Rank(sum({<Class={'A'}>}num(today())-num(Date)),4,1),(ID,(sum({<Class={'A'}>}num(today())-num(Date)))))

25 Replies
ahaahaaha
Honored Contributor

Re: Sequential number instead of Dimension values

Hi,

May be add a match table like the one below and use a new dimension [NewField]?

LOAD*Inline

[Field, NewField

10$, 1

44$, 2

$5, 3

$2, 4

$30, 5

$12, 6

];

MVP
MVP

Re: Sequential number instead of Dimension values

May be using autonumber(), like:

Load

         AutoNumber("no of days open") as Sequence

         "no of days open",

          ...

And then use Sequence as dimension.

Re: Sequential number instead of Dimension values

another option is to use Rank function to convert your dimension in number

=aggr(rank(ID),ID)

divya_anand
Contributor II

Re: Sequential number instead of Dimension values

Hi Andrey,

Thank you for the response.

This is just an example showing 6 values, but in my database contains a huge list - Not practical this way.

Re: Sequential number instead of Dimension values

divya_anand
Contributor II

Re: Sequential number instead of Dimension values

Hi Rob,

Thank you for the response.

FieldIndex provides the load position of the value right?

I am looking for the ordering in the chart itself, whether the ID is at position 100 or 1000 in the load order doesn't matter. Only the position of that ID within the chart is to be displayed ( 1,2,3,4..... from left to right). Is this possible?

divya_anand
Contributor II

Re: Sequential number instead of Dimension values

Hi Kushal,

Thank you for the response.

This only converts ID into a number, but doesn't display numbers starting from 1. Any other thought?

divya_anand
Contributor II

Re: Sequential number instead of Dimension values

Hi Tresesco,

I am trying to avoid working with datamodel because "no of days open" is not just a field, it is an expression with several conditions on fields in more than 1 table. If I don't find a solution which can be implemented in the layout itself, I'll give this a try and will keep you posted.

Thank you.

Re: Sequential number instead of Dimension values

please provide some sample data as well as the expression you are referring to.

thanks

regards

Marco

Community Browser