Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

piotrama
New 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

Re: How to sort dimension with roman numbers?

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.

5 Replies
Chanty4u
Esteemed Contributor III

Re: How to sort dimension with roman numbers?

may be with this

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

isingh30
Contributor III

Re: How to sort dimension with roman numbers?

What is your interface language setting in the tool?

Thank you!

Re: How to sort dimension with roman numbers?

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.

Re: How to sort dimension with roman numbers?

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
Honored Contributor III

Re: How to sort dimension with roman numbers?

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

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

Community Browser