Bad Date Ordering in Pivot Tables

User avatar
elviseras
Investor
Investor
Posts: 578
Joined: 08 Feb 2017, 03:16
Name: Elvix Sampedro
Location: Galicia - Spain
Company Name: novaTEK

Bad Date Ordering in Pivot Tables

Post by elviseras »

Hi,

When making a report with Pivot Tables about progression of amount of support tickets over time, there is a problem with data sorted alphabetically because when using a date field this order is not valid and should be sorted by date. See the attached images....
Pivot_Tables_BadDateOrdering_1.png
Pivot_Tables_BadDateOrdering_2.png

I would appreciate it if you reviewed it as soon as possible...

Regards
rmcdonald
Investor
Investor
Posts: 417
Joined: 19 Dec 2018, 02:33
Name: Robert McDonald
Location: Auckland, New Zealand
Company Name: Unicloud
Contact:

Re: Bad Date Ordering in Pivot Tables

Post by rmcdonald »

Yes we have the same problem - had to number the months and limit the year to get around it a little
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Bad Date Ordering in Pivot Tables

Post by support »

Yes, there is issue with this report. It always use alphabetic order. You can configure data format so as solution just add year and month number at the start.
User avatar
elviseras
Investor
Investor
Posts: 578
Joined: 08 Feb 2017, 03:16
Name: Elvix Sampedro
Location: Galicia - Spain
Company Name: novaTEK

Re: Bad Date Ordering in Pivot Tables

Post by elviseras »

Hi Sergey,
You can configure data format so as solution just add year and month number at the start.
Can you tell me how to configure this ?? I've tried but I can not get it to work...
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Bad Date Ordering in Pivot Tables

Post by support »

When you setup fields for pivot report you can configure custom date format. See attached
Attachments
screenshot-pm.rukovoditel.net-2019.05.07-20-06-57.png
User avatar
elviseras
Investor
Investor
Posts: 578
Joined: 08 Feb 2017, 03:16
Name: Elvix Sampedro
Location: Galicia - Spain
Company Name: novaTEK

Re: Bad Date Ordering in Pivot Tables

Post by elviseras »

Ok Sergey thanks..now I understand

Just one more thing .. Is it possible to insert some character in the date format, in addition to the space? How should I write it so that it is not identified as a date variable?

regards
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Bad Date Ordering in Pivot Tables

Post by support »

Just try it.
User avatar
elviseras
Investor
Investor
Posts: 578
Joined: 08 Feb 2017, 03:16
Name: Elvix Sampedro
Location: Galicia - Spain
Company Name: novaTEK

Re: Bad Date Ordering in Pivot Tables

Post by elviseras »

Ohh, I've already tried it but it does not work. Example: I need to put the word "Week" to identify the weeks (Week 34, Week 35 and so on), but always interpret the variable W and enter the week number (34eek 34, 35eek 35 and so on).

I've already tried putting it between single quotes ' and double quotes " but it does not work either
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Bad Date Ordering in Pivot Tables

Post by support »

Well, then use just number.
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Bad Date Ordering in Pivot Tables

Post by support »

Also see documentation
https://www.php.net/manual/ru/function.date.php

Code: Select all

$today = date('\i\t \i\s \t\h\e jS \d\a\y.');   // it is the 10th day.
It means you can use "\" to insert custom text in format. So in your case format will be

Code: Select all

\W\e\e\k W
Let me know if it works.
Post Reply