If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Sorting by Date Format

Started by bud659, 21 Jul 2014 09:20:40 AM

Previous topic - Next topic

bud659

I am using a relational model with the Date is in MM:DD:YY HH:MM:SS.    I have a requirement to sort the date by a MM-YYYY and then Count all the orders in that Month.

So it should look like this

Date          Total Order Count
06-2014     100
07-2014     110

I have used to_char to display the date in the correct format,  but can't get it to sort properly.

Lynn

You can either change the format to YYYY-MM or else create a second data item in that format and use it as a sort key.

bud659

I changed to YYYY-MM and the sorting works descending..  is there a way to make it Ascending?

bud659

I also tried a second data item which also worked,  but it broke my total order count by Month.  The Total order count displays all the orders by each DD:MM:YY HH:MM:SS  instead of total by the MM-YYYY  (now in correct order)..   any hints?  Thank you


Lynn

Quote from: bud659 on 21 Jul 2014 10:05:41 AM
I also tried a second data item which also worked,  but it broke my total order count by Month.  The Total order count displays all the orders by each DD:MM:YY HH:MM:SS  instead of total by the MM-YYYY  (now in correct order)..   any hints?  Thank you

My car is broken. Can you fix it?

I don't really think I could expect someone to answer that question unless I was able to provide specific details.

Is your source relational or dimensional? If your report is showing ordr count down to the second then it would be 86,400 lines long for just one day's worth of activity. Is this really what you are doing? What method are you using to get the totals?

bud659

hi lynn.  thanks for the responses and sorry for the lack of details.  I am going to use the sorting with descending order.  this is working and thanks for your help