Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi to all, i have a litle problem:
I have a table like this:
IN_Procedures:
LOAD * INLINE [
ProcId,ProcDesc
1,First procedure
2,Second procedure
3,Third procedure
...
];
And then i have a table of data like this:
Tickets:
LOAD
NroTicket,
[First procedure],
[Second procedure],
[Third procedure],
...etc...
FROM ...\Tickets.qvd (qvd)
Where the table Tickets, in the fileds [First Procedure], [Second Procedure], etc. has values like 1 or 0 (like true or false).
Well, i need to link this 2 tables by he fields [First procedure] , [Second Procedure], etc... to create a pivot table like the following:
And then if i do some click on the pivos table procedure it show me in other grafic the detail of the records of ticket for that selection.
But i couldn't. How can i do that thing. What can i use to convert the tables to do that??
Thanks to all in advance.
Regards
Tickets:
// convert procedure columns to rows
CROSSTABLE (ProcDesc,Flag)
LOAD
NroTicket
,[First procedure]
,[Second procedure]
,[Third procedure]
...
from ...\Tickets.qvd (QVD);
// remove rows where the flag isn't set
INNER JOIN (Tickets)
LOAD 1 as Flag
AUTOGENERATE 1;
// and drop the flag
DROP FIELD Flag;
Tickets:
// convert procedure columns to rows
CROSSTABLE (ProcDesc,Flag)
LOAD
NroTicket
,[First procedure]
,[Second procedure]
,[Third procedure]
...
from ...\Tickets.qvd (QVD);
// remove rows where the flag isn't set
INNER JOIN (Tickets)
LOAD 1 as Flag
AUTOGENERATE 1;
// and drop the flag
DROP FIELD Flag;
John Witherspoon wrote:
Tickets:
// convert procedure columns to rows
CROSSTABLE (ProcDesc,Flag)
LOAD
NroTicket
,[First procedure]
,[Second procedure]
,[Third procedure]
...
from ...\Tickets.qvd (QVD);
// remove rows where the flag isn't set
INNER JOIN (Tickets)
LOAD 1 as Flag
AUTOGENERATE 1;
// and drop the flag
DROP FIELD Flag;<div></div>
Many many thanks John W. I adapted it to my scheme...it works perfect!!!
Thanks again!
Regards