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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
piotrama
Contributor II
Contributor II

How to sort dimension with roman numbers?

Hi,

I have a dimension that has numbers in roman format ( V = 5; X = 10 etc.). How can i sort by this dimension just like I would with normal numbers?

1 Solution

Accepted Solutions
Anonymous
Not applicable

Just found this On Format Codes for Numbers and Dates that mentions Roman Numerals

And tried these expressions in a couple of Text objects :

     num(1234,'(ROM)')

     Num(num#('MCCXXXIV' ,'(ROM)'))

They actually work!!!  Never knew one could do this in Qlik.

So you should be able to create a sort expression.

View solution in original post

5 Replies
Chanty4u
MVP
MVP

may be with this

=match(DimensionField,'I','II','III',I'IV'...........)

isingh30
Specialist
Specialist

What is your interface language setting in the tool?

Thank you!

Anonymous
Not applicable

Store it as a Dual() with the Roman Numeral as the text and the normal number as the number and then sort numerically, but display the text.

There is an algorithm here https://www.geeksforgeeks.org/converting-roman-numerals-decimal-lying-1-3999/ that could help you.

Anonymous
Not applicable

Just found this On Format Codes for Numbers and Dates that mentions Roman Numerals

And tried these expressions in a couple of Text objects :

     num(1234,'(ROM)')

     Num(num#('MCCXXXIV' ,'(ROM)'))

They actually work!!!  Never knew one could do this in Qlik.

So you should be able to create a sort expression.

sasiparupudi1
Master III
Master III

Use the Sort Expression for the dimension by unticking all the other options

Num(Num#(RomanNumber,'(ROM)'))