Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sergio
Contributor III
Contributor III

Link a field with a field value

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:

error loading image

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

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

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;

View solution in original post

2 Replies
johnw
Champion III
Champion III

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;

sergio
Contributor III
Contributor III
Author


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