Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
divya_anand
Creator III
Creator III

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?

1 Solution

Accepted Solutions
tresesco
MVP
MVP

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)))))

View solution in original post

25 Replies
ahaahaaha
Partner - Master
Partner - Master

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

];

tresesco
MVP
MVP

May be using autonumber(), like:

Load

         AutoNumber("no of days open") as Sequence

         "no of days open",

          ...

And then use Sequence as dimension.

Kushal_Chawda

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

=aggr(rank(ID),ID)

divya_anand
Creator III
Creator III
Author

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.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

divya_anand
Creator III
Creator III
Author

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
Creator III
Creator III
Author

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
Creator III
Creator III
Author

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.

MarcoWedel

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

thanks

regards

Marco