Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
(I'm new to QlikView, and I apologize if there is already a solution to this posted somewhere, but I couldn't figure out how to ask the question.)
I have data that I would like to display in a pivot chart format, but I would like the user to be able to sort by the last dimension that is arrayed along the top row of the chart. For example, given this sales data:
Sales:
LOAD * INLINE [
ID, Year, Total
1, 2010, 12000
1, 2009, 23500
1, 2008, 17600
2, 2010, 23200
2, 2009, 12090
2, 2008, 22300
3, 2010, 33430
3, 2009, 26000
3, 2008, 19090
4, 2010, 21000
4, 2009, 15000
4, 2008, 10000
];
I would like to create a table like this, but with the ability to click on the year to sort by that year. Suggestions anyone?
ID | Year | 2010 | 2009 | 2008 |
1 | $12,000 | $23,500 | $17,600 | |
2 | $23,200 | $12,090 | $22,300 | |
3 | $33,430 | $26,000 | $19,090 | |
4 | $21,000 | $15,000 | $10,000 |
UPDATE: I did find some forum posts about making an actual pivot chart "sortable", but adding something like a multi-box to control sorting isn't what I need. I would rather this be something like a straight table where the user can actually click on the column headers to sort.
Hi there,
possibly not what you are looking for, but see attached QVW.
It is using a straight table as well. - was there another reason why you wanted to use a pivot?
This was done by creating an expression for each year - which isn't ideal if the data coming down can contain many years
You can see that it sorts though..
No, no particular need to use an actual pivot. This solution is perfect. Thank you!