Hi Excel experts,
I have a .NET app that produces an Excel Pivot Table. One of the many existing fields contains a DATE. With the DATE column as a base I calculate the YEAR, QUARTER and MONTH according to trivial formulas. The QUARTER in particular is calulated either as a Calendar quarter (Q1 = month 1-3, Q2 = month 4-7 ...) OR as our companies specific Fiscal Year (Q1 = month 10-12, Q2 = month 1-3 ...). The calculation is correct and the result is a 1 for quarter #1, 2 for quarter #2 etc.
Now if I look in my Pivot result the Quarter field is sorted 1, 2, 3, 4 disregarding it it's a FY Year or not.
However, the customer ordering this application now wants the Pivot field to look like Q1, Q2, Q3, Q4. Ok, so I made a string in Excel using the TEXT function as: ="Q"&TEXT(MOD(CEILING(22+B2 -9-1;3)/3;4)+1;"0") where cell B2 contains the MONTH number. Now I got these result in all my Quarter cells. BUT in the PIVOT the sorting of these are now Q2, Q3, Q1, Q4 (since I'm using the FY Year formula).
I need ASAP help to solve this since the app is "going-live" next week and I'm totally out of solutions.
BR,
Peer
I have a .NET app that produces an Excel Pivot Table. One of the many existing fields contains a DATE. With the DATE column as a base I calculate the YEAR, QUARTER and MONTH according to trivial formulas. The QUARTER in particular is calulated either as a Calendar quarter (Q1 = month 1-3, Q2 = month 4-7 ...) OR as our companies specific Fiscal Year (Q1 = month 10-12, Q2 = month 1-3 ...). The calculation is correct and the result is a 1 for quarter #1, 2 for quarter #2 etc.
Now if I look in my Pivot result the Quarter field is sorted 1, 2, 3, 4 disregarding it it's a FY Year or not.
However, the customer ordering this application now wants the Pivot field to look like Q1, Q2, Q3, Q4. Ok, so I made a string in Excel using the TEXT function as: ="Q"&TEXT(MOD(CEILING(22+B2 -9-1;3)/3;4)+1;"0") where cell B2 contains the MONTH number. Now I got these result in all my Quarter cells. BUT in the PIVOT the sorting of these are now Q2, Q3, Q1, Q4 (since I'm using the FY Year formula).
I need ASAP help to solve this since the app is "going-live" next week and I'm totally out of solutions.
BR,
Peer