Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

SORTING IN PIVOT TABLE

I have customer wise sales data per month. I have created a pivot table showing Customer Name Vs Monthwise sales.

Also sorted data decreasing manner for total sale per customer.

Data for first few customers shown below....

Customer NameMonthTotalJanFebMarAprMayDec
Total7,569,868866,396917,070904,956660,1911,284,303639,091
Customer 1987,912117,230121,298160,14689,691128,4541,453
Customer 2743,881179,02262,59356,743118,12296,074
Customer 3524,9236,537109,20389,726
Customer 4497,782497,782
Customer 5395,612118,45993,752133,72112,4458,350
Customer 6341,99414,4748,99481,6003,786133,288


My problem is from above table December Month data is for 2010 while January to May months sale is for 2011.

So I need this pivot table should show data as DEC JAN FEB MAR APR MAY...

Please help...

1 Solution

Accepted Solutions
johnw
Not applicable

Re: SORTING IN PIVOT TABLE

Are your months defined like this?

month(Date) as Month

If so, that's why they don't sort with the year taken into account.  To include the year, define your months as dates:

date(monthstart(Date),'MMM YYYY') as Month

You don't HAVE to include YYYY there, if you only want to show the month name, but I think it'll be confusing without it.

4 Replies
its_anandrjs
Not applicable

SORTING IN PIVOT TABLE

Hi,

You need to sort your Month Colum by Decending order then the pivot chart automatically display Dec,Jan,Feb,mar,Apr,May by Properties->Sort->Expression->Select Month column then select Descending order.

Regards,

Anand

Not applicable

SORTING IN PIVOT TABLE

It's not working

johnw
Not applicable

Re: SORTING IN PIVOT TABLE

Are your months defined like this?

month(Date) as Month

If so, that's why they don't sort with the year taken into account.  To include the year, define your months as dates:

date(monthstart(Date),'MMM YYYY') as Month

You don't HAVE to include YYYY there, if you only want to show the month name, but I think it'll be confusing without it.

Not applicable

SORTING IN PIVOT TABLE

Dear John, It's now working... Thanks for your help...