Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

manipulating labels in the x-axis

Hi,


I have big integer keys on the x-axis, like 100032, 2000012 etc

Is there a way I could sort these and display just 1, 2, 3 and so on in order instead of their actual codes.. I still want these keys to work as they are working, I just want to have 1 instead of 100032, 2 instead of 2000012 etc for visualization purposes..

is there a way to achieve this?

Thanks!!

1 Solution

Accepted Solutions
stigchel
Partner - Master
Partner - Master

Yes you can, disable the show legend of the Dimension, add an expression (make it the first by promoting it) and in the display options check text on axis and deselect any other display options like bar/line/symbol.

For the expression you can use an expression that will give you the required numbering (rowno()/columnno(), rank(..))

TextOnAxis.png

View solution in original post

11 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Maybe by using something like dual( aggr(rowno(),MyDim),MyDim) as a calculated dimension.


talk is cheap, supply exceeds demand
Not applicable
Author

Hi yukti,

try this

add calculated dimension like (your_dimension/100000)

then in numbers tab check the integer checkbox to display it as a whole value!

or else use symbols of million,thousands!

hope it helps!

Regards

Barathiraja

Not applicable
Author

Hi Gysbert,

I thought it would work, but it aggregates everything and shows only one data point..

kushalthakral
Creator III
Creator III

Hi yukti

you can use left() function and use 1st digit of number to use it as a label in a script

Regards

Kushal T

Not applicable
Author

hey no actually keys have different values as in they could also be like 1000806, 1000807, 1000808 and so on...

Not applicable
Author

or maybe if there's a way I could display an expression on the x-axis?

Not applicable
Author

You can use a map table which contains the dimension and a short form of the dimension. See the attached example

Not applicable
Author

Use the short form of the dimension in your chart and it will show the correct values from the main table.

Not applicable
Author

it might sound a little weird to understand, but this is the requirement.. no matter what the key is, the numbers should be displayed in sequence .. 1 for first key, 2 for second key, 3 for third key... and so on...