cross tab query, sort by date

benjamin.grimm

Registered User.
Local time
Today, 08:21
Joined
Sep 3, 2013
Messages
125
Hello I have a cross tab query, where i count the number of produced busses in the future in different countries.

Right now it sorts like this:

xxxx Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec

AT
BE
DE
SE
FR

and so on.

I want that it get sorts like this

xxxx Mar Apr May Jun Jul Aug Sep Oct Nov Dec

AT
BE
DE
SE
FR

So allways start with the current monts.

here is my SQL:

Code:
TRANSFORM Count([2_geplannt_MB_Gesamt].Verkaufsorg) AS AnzahlvonVerkaufsorg
SELECT [2_geplannt_MB_Gesamt].[Land Regulierer], Count([2_geplannt_MB_Gesamt].Verkaufsorg) AS [Gesamtsumme von Verkaufsorg]
FROM 2_geplannt_MB_Gesamt
GROUP BY [2_geplannt_MB_Gesamt].[Land Regulierer]
PIVOT Format([Bauplatztermin],"mmm") In ("Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez");

greetz benjamin
 

Users who are viewing this thread

Back
Top Bottom