Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Compare two tables and derive third
RobbieBIRT
Hi,
I would like to compare two tables with same headings (i.e., Colum names) and create a third table ( in a dynamic sense), indicating if the values between the tables differ, i.e., indicate the value Gap (Table 3).
The reason for doing this is that I want to demonstrate that with BIRT one can compare "Required level of competencies" required execution of different roles (Table 1) and the "Actual Persons Competencies" executing those roles (Table 2).
I realise that I need some generic approach since writing computed column (Table 3) for each new person is an exhausting and static job., see e.g.,
if ( row["Required-Role-Person:: Competence 1"] == row["Actual::Competence 1"]) {
row["GapOK"]
}
else {
row["GapNOK"]
}
Find more posts tagged with
Comments
mwilliams
So, are these crosstabs or regular tables? Can you show what the data in your different dataSets looks like? Thanks!
RobbieBIRT
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="98303" data-time="1332910366" data-date="27 March 2012 - 09:52 PM"><p>
So, are these crosstabs or regular tables? Can you show what the data in your different dataSets looks like? Thanks!<br /></p></blockquote>
<br />
Hi, <br />
<br />
The data is according Excell file (BIRT-problem-compare tables.xls (30.5K) ) see the link to the file in my original post and is imported as Flatfiles. I.e., those are just regular tables. <br />
<br />
Simply I would like to compare data from one sepeadsheet (Table 1) with data from other spreadsheet (Table 2) in a third speadsheet (Table 3) ; (and it works pretty fine in Excell for SMALL and limited sets).<br />
<br />
E.g., if the cell of the Comptence_1-Role-1 diefferes between spreadsheets (i.e., Tables 1 and 2) the value in Table 3 shall have value NOK otherwise OK. <br />
<br />
In BIRT I have approached that I put data from both spreadsheets in a JOINT set and from there I can produce computed columns for a third table. <br />
<br />
<br />
My first problem is that I would need for each column to write a rule for each computed column. Is there any generic rule that I can apply like. <br />
<br />
The second problem is that no. of rows (Comptencies) and no. of columns (Roles ) can grow. <br />
<br />
<br />
I would like to have something more dynamic like e.g. (observe that code below is totally made-up) , <br />
<br />
for each Column<br />
if ( table1.getRow().getCol()== table2.getRow().getCol() {<br />
table3.values["GapOK"]<br />
}<br />
else {<br />
table3.values["GapNOK"]<br />
}<br />
end //of for//
mwilliams
Sorry for the delay. I was at EclipseCon, last week. So, your output will be XLS? I just want to test with the same output, since there are some differences. Let me know.