Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi to all,
Anyone of you explain how to sort the month by order.
My month dimension like below
month:
Apr
Aug
Jul
Jun
Sep
Oct
Nov
Mar
May
Jan
Feb
But I want month list like
Month
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Nov
Dec
if the field have a date format, order are automaticly good as Num(Month)
Can you upload more explicity your problem?
To sort by Month (numeric) is necesary to have date format
That's because your month is a text field. Convert it to a proper month field during load. The month field is a dual with the month number as a value and a text representation of the 3 character month name.
LOAD...
Month As MonthText, // do you need this field?
Month(Date#(Month & '2015', 'MMMYYYY')) As Month,
(the year used is irrelevant)
This month field should be sorted numerically (as is usual for dual values)
Sort expression: =Month(Date#(month,'MMM'))
PFA
Hi try this
LOAD * INLINE [
Month,Month_NO
Apr,4
Aug,8
Jul,7
Jun,6
Sep,9
Oct,10
Nov,11
Dec,12
Mar,3
May,5
Jan,1
Feb,2
];
Then in list box of Month Go to Sort Tab>Expression write the Month_NO
Thanks And Regards
Amarnath
Hi,
Please find the attachment.
Edit
month:
LOAD Month(Date#(Month,'MMM')) as month
INLINE [
Month,
Apr
Aug
Jul
Jun
Sep
Oct
Nov
Mar
May
Jan
Feb
];
Hi,
for the
Month(Date#(month,'MMM'))
approach (best done in the script) you might have to adjust your MonthNames variable to
SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';
if that's not your local default.
regards
Marco
Copy the script and use Sortvalue descending in sort expression.
Load *, INLINE [
Month,Sortvalue
Apr,4
Aug,8
Jul,7
Jun,6
Sep,9
Oct,10
Nov,11
Dec,12
Mar,3
May,5
Jan,1
Feb,2
];
In Sort Tab, under expression:
wildmatch(Month_field,'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec')
=wildmatch(capitalize(only({1}CalMonth)),'JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG','SEP','OCT','NOV','DEC')
Hope this will helps you..!!
Regards,
Mohammad