Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sujit_nath
Creator III
Creator III

Sorting data in qlikview

Hi Guys,

I have requirement as such:

The original column has values like:

Feild A
[33][453][233][78]
[90][34][12]
[10][11]
[444][43][900]

I want to sort this and get the final output as:

Feild A
[33][78][233][453]
[12][34][90]
[10][11]
[43][444][900]

Whats the way to do this and efficiently , as actual data is much bigger.

3 Replies
tresesco
MVP
MVP

try like:

Load

           FieldA,

           '['&Concat(Num, '][', Num)&']' as Num

Group By FieldA ;


Load *,

           Purgechar(SubField(FieldA, ']['),'][') as Num

Inline "

FieldA

[33][453][233][78]

[90][34][12]

[10][11]

[444][43][900]"


Capture.JPG

marcus_sommer

You could use something like this:

t0: load keepchar(subfield(FieldA, ']['), '0123456789') as FieldA from Source;

t1: noconcatenate load '[' & concat(FieldA, '][', FieldA)  ']' as FieldA resident t0;

drop tables t0;

- Marcus

sujit_nath
Creator III
Creator III
Author

Thanks Marcus and Tresesco. Let me try these and get back.