Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
Hi Divya,
Maybe:
Aggr(Dual(ID,Rank(Expression)),ID)
Good luck
Andrew
Try this,
Make one composite key Script level...
RowNo() &'-'&YourFields as NewField
and in your chart Dimension
SubField(NewField,'-', 1)
OR
Only take RowNo() as Key in script
and in your chart Dimension
SubField(Key&'-'&YourDimension,'-', 1)
Good luck
How are the IDs currently sorted on the Xaxis?
-Rob
Rob,
The IDs are supposed to be sorted in descending order of "No. of days open". So all the IDs which have higher value for "No. of days open" will appear on the left and the line will gradually drop because all the IDs with lower value of "No. of days open" will appear on the right side of the chart.
Irrespective of which ID is on X-axis, it has to be numbered 1,2,3.... from left to right. This will help users get a count of IDs instead of the IDs itself.
Thank you.
If you are using qv12.x or qlik sense, you could probably use sortable aggr() to achieve this.
I would try Andrew's suggestion below.
-Rob
Hi Andrew,
I tried this on sample data, it still shows the ID itself on X-axis. I want it to be named 1,2,3,4..... on the chart.
PFA the sample qvw.
Could you please check & let me know if any change is to be made?
Thank you.
Hi Marco,
I've attached a sample QVW in a reply to Andrew below.
Please let me know if you need more information.
Thank you.
This?
Hi Tresesco,
Thank you for the quick response.
I see that you have considered RowNo() to number them based on load order, right?
But can we make this chart to show values in descending order like this-
Yet name them 1,2,3,4... from left to right?
Is this possible?