Not sure if I fully understand your table structure, could you post some lines of sample data togehter with your expected result?
If I had a kind of crosstable with several fields containing the same type of data, I would start with a crosstable load (please check the help for crosstable load prefix) to convert the table into a straight table:
Crosstable (Type, Hours) LOAD recno(), * INLINE [
Audio, Video, News, Work
2, 1, 3, 4
Just used four fields to demonstrate...
The create a pie chart with dimension Type and as expression
and check the relative option?
Thanks for the reply, sadly i can't really post the data file but it is a table of:
Year (Derived from Date on Reload), Date (yyyy-mm-dd), Hours1, Hours2, Hours3, Hours4, Hours5, Hours6, Hours7, Hours8, Hours9, Hours10
Ideally i want a pie chart saying for a year Hours1 was 20%, Hours2 was 10%, Hours3 was 5% etc.
- can isomehow use a crostableforthat?
Ah sorry i've oversimplified, so instead of being called 'hours1,hours2,hours3' the fields are called things like 'BobsPlayer, JimsSystem, GeorgeHome' - for example - is this example going to knacker me if i'm not using Hour<int> naming?
Also presumably i don't have to worry about the date field since that can be done with listbox filtering?
The Names of your fields that are going to be transferred into the Type field (you can of course name your Type field as you like, just give the name in the CROSSTABLE arguments) are absolutely arbitrary. The cross table load will eat all fields that follow the qualifying fields (so you need to take care on the order you are loading your fields!).
Your date field as a qualifying field will not be transformed, but the relation to the TYPE and Values will still exist, so a filtering will no problem. Or have I misunderstood you here?