Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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.
may be with this
=match(DimensionField,'I','II','III',I'IV'...........)
What is your interface language setting in the tool?
Thank you!
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.
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.
Use the Sort Expression for the dimension by unticking all the other options
Num(Num#(RomanNumber,'(ROM)'))