Announcements
The way to achieve your own success is the willingness to help somebody else. Go for it!
cancel
Showing results for
Did you mean:
Creator III

## Date Sorting issue

Hi

experts,

i have date field in MMM YY format.

i want to sort my bar chart to the specific order like below.

MTD          MTD-1          MTD-2      [last Year MTD]

June 2016     May 2016     Apr 2016     June 2015

Thanks & Regards

Ahmar Ansari

1 Solution

Accepted Solutions
Creator III
Author

Thank you friends for your support.i just solved the issue from load script by using order by.

Thanks & Regards

7 Replies
Creator II

Try to just check the Load Order->Reversed in Sort Tab,uncheck every other option in sort tab.

MVP & Luminary

Quite often worked a sorting-expression like: avg(Date) for it (if those yearmonth-field is related to a date).

- Marcus

Specialist

Hi

Try like this

Write this in sort tab

if(FMonthYear2='Apr 17',1,if(FMonthYear2='Mar 16',2,if(FMonthYear2='Feb 16',3,if(FMonthYear2='Apr 16',4))))

Regards,

Mahesh

Not applicable

Hi Ahmar,

In sort bt expression use below expression:

=MATCH(MAX(mAKEDATE(FiscalYear,FiscalMonth)),MAX(MAKEDATE(FiscalYear,FiscalMonth))-1,MAX(MAKEDATE(FiscalYear,FiscalMonth))-2)

Find attached app. Its working as per your sort requirement.

MVP

Sum({<FMonthYear2 = {"\$(='>=' & Date(MonthStart(Max(FMonthYear2), 0), 'MMM YY') & '<=' & Date(MonthEnd(Max(FMonthYear2), 0), 'MMM YY'))",

"\$(='>=' & Date(MonthStart(Max(FMonthYear2), -1), 'MMM YY') & '<=' & Date(MonthEnd(Max(FMonthYear2), -1), 'MMM YY'))",

"\$(='>=' & Date(MonthStart(Max(FMonthYear2), -2), 'MMM YY') & '<=' & Date(MonthEnd(Max(FMonthYear2), -2), 'MMM YY'))",

"\$(='>=' & Date(AddYears(MonthStart(Max(FMonthYear2), 0), -1), 'MMM YY') & '<=' & Date(AddYears(MonthEnd(Max(FMonthYear2), 0), -1), 'MMM YY'))"}

,FiscalMonth, FiscalYear>}Value)

Not applicable

Just another Approach...

why not switching the format from MMMM YY to YY/MMMM ?

(e.g. by  right(DateField,2)&'/'&left(Datefield,4), or if you have the date you can insert it in the Date() function).

it will sort your Charts automatically without too sophisticated formulas...

Creator III
Author

Thank you friends for your support.i just solved the issue from load script by using order by.

Thanks & Regards

Community Browser