Skip to main content
Announcements
Marching toward a simplified navigation! READ ON
cancel
Showing results for 
Search instead for 
Did you mean: 
niharika1234
Creator
Creator

Sorting a Column

 

Hello,

I want sort a column.  Below is screen shot. I want the '-' to be at top and sorted  by A_Z . I want to see the number portion  like 13-11-26-218-53, on bottom. The _ should be at Top followed  by  CAM0002, etc. Please suggest.

Untitled.png

1 Reply
bgerchikov
Partner - Creator III
Partner - Creator III

My guess is '-' is a value, not missing data. So, use Dual function during the load and apply   'Sort Numerically' option

TempData:
Load * Inline
[
Product, Date, Price
-,43404,15
12-Apple,43404,15
22_Banana,42404,100
Apple,43404,15
Apple,43403,15
Apple,43402,20
Apple,43401,14
Banana,42404,100
11-Apple,43404,15
21_Banana,42404,100
Banana,42404,150
Banana,42402,170
32-Banana,42402,270
Banana,42400,70
Banana,42339,50
]
;

Data:
NoConcatenate Load
    Dual(Product,If(Product='-', NoOfRows('TempData'), RowNo())) AS Product,
    Date,
    Price
Resident TempData
Order By Product
;
drop Tables TempData;

Good luck!