Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi members,
I need the branches to be sorted as like below.
1 RA
2 EH
3 K7
4 K9
5 EM
6 AS
7 TA
8 MY
I need this to be done in the form of an expression but not in the front end.
Thanks
Neville
SortingMap:
MAPPING LOAD *
INLINE [
txt, num
RA, 1
EH, 2
K7, 3
K9, 4
EM, 5
AS, 6
TA, 7
MY, 8
];
NOCONCATENATE
LOAD
BRANCH,
PREMIUM,
Dual(BRANCH, ApplyMap('SortingMap', BRANCH, 100000)) AS BranchTemp
FROM [D:\CUSTOMER SORTING.xlsx] (ooxml, embedded labels, table is Sheet1);
DROP FIELD BRANCH; RENAME FIELD BranchTemp TO BRANCH;
You just have to add the BRANCH field as a dimension in a chart and make sure it is numerically ordered.
As an expression, but not on front end? what do you mean? Not sure I completely understand
Yes,
It likes, I need this to be achieved not in the script level. May be as a calculated dimension etc
SortingMap:
MAPPING LOAD *
INLINE [
txt, num
RA, 1
EH, 2
K7, 3
K9, 4
EM, 5
AS, 6
TA, 7
MY, 8
];
NOCONCATENATE
LOAD
BRANCH,
PREMIUM,
Dual(BRANCH, ApplyMap('SortingMap', BRANCH, 100000)) AS BranchTemp
FROM [D:\CUSTOMER SORTING.xlsx] (ooxml, embedded labels, table is Sheet1);
DROP FIELD BRANCH; RENAME FIELD BranchTemp TO BRANCH;
Thanks JGMD
This is fine. If this is to be achieved in front end,how it will b done?
Thanks
Neville
You just have to add the BRANCH field as a dimension in a chart and make sure it is numerically ordered.