Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Compare two tables

Hi,

I have two datasets with the same fields, one is year 2012 and the other one is year 2014.

Dataset 2012 is renamed to avoid problems.

In a barchart I want to compare the datasets for each field.

For each field one barchart.

See attacht example.

I think the solution is to join the two dataset but I don't know how.

Script.

06012014:

LOAD omschrijving as Ruimte,
[voorlopig ruimtenummer:],
gebruikstijd,
[beschikbaarheidsgebrek: comfort/binnencondities],
[beschikbaarheidsgebrek: functionaliteit en toegankelijkheid],
[beschikbaarheidsgebrek: representativiteit],
[beschikbaarheidsgebrek: veiligheid en gezondheid],
[beschikbaarheidsgebrek: wet- en regelgeving],
Belang,
[AQL niveau]
FROM
[Data\06-01-2014\BB Ruimten 06-01-2014 (*).xlsx]
(
ooxml, embedded labels, table is Blad2);


21052012:
LOAD omschrijving as ruimte2012,
[voorlopig ruimtenummer:] as [voorlopig ruimtenummer:2012],
gebruikstijd as gebruikstijd2012,
[beschikbaarheidsgebrek: comfort/binnencondities] as [beschikbaarheidsgebrek: comfort/binnencondities2012],
[beschikbaarheidsgebrek: functionaliteit en toegankelijkheid] as [beschikbaarheidsgebrek: functionaliteit en toegankelijkheid2012],
[beschikbaarheidsgebrek: representativiteit] as [beschikbaarheidsgebrek: representativiteit2012],
[beschikbaarheidsgebrek: veiligheid en gezondheid] as [beschikbaarheidsgebrek: veiligheid en gezondheid2012],
[beschikbaarheidsgebrek: wet- en regelgeving] as [beschikbaarheidsgebrek: wet- en regelgeving2012] ,
Belang as Belang2012,
[AQL niveau] as [AQL niveau2012]
FROM
[Data\21-05-2012\BB Ruimten 21-05-2012 (*).xlsx]
(
ooxml, embedded labels, table is Blad2);

1 Solution

Accepted Solutions
Not applicable
Author

Hi Ralph

Try Like this

06012014:

LOAD

'2014' as YearFlag,

omschrijving as Ruimte,
[voorlopig ruimtenummer:],
gebruikstijd,
[beschikbaarheidsgebrek: comfort/binnencondities],
[beschikbaarheidsgebrek: functionaliteit en toegankelijkheid],
[beschikbaarheidsgebrek: representativiteit],
[beschikbaarheidsgebrek: veiligheid en gezondheid],
[beschikbaarheidsgebrek: wet- en regelgeving],
Belang,
[AQL niveau]
FROM
[Data\06-01-2014\BB Ruimten 06-01-2014 (*).xlsx]
(
ooxml, embedded labels, table is Blad2);


concatenate


21052012:
LOAD

'2012' as YearFlag,

omschrijving as ruimte,
[voorlopig ruimtenummer:]
gebruikstijd ,
[beschikbaarheidsgebrek: comfort/binnencondities] ,
[beschikbaarheidsgebrek: functionaliteit en toegankelijkheid] ,
[beschikbaarheidsgebrek: representativiteit] ,
[beschikbaarheidsgebrek: veiligheid en gezondheid],
[beschikbaarheidsgebrek: wet- en regelgeving],
Belang ,
[AQL niveau]
FROM
[Data\21-05-2012\BB Ruimten 21-05-2012 (*).xlsx]
(
ooxml, embedded labels, table is Blad2);

View solution in original post

5 Replies
Not applicable
Author

what you want to compare exactly ...is there any specific field you want to compare or all of the fields ???

if you are comparing just one field the you can create composite key in both the tables.

and that should do the trick.

regards

harshal

Not applicable
Author

Hi Ralph

Try Like this

06012014:

LOAD

'2014' as YearFlag,

omschrijving as Ruimte,
[voorlopig ruimtenummer:],
gebruikstijd,
[beschikbaarheidsgebrek: comfort/binnencondities],
[beschikbaarheidsgebrek: functionaliteit en toegankelijkheid],
[beschikbaarheidsgebrek: representativiteit],
[beschikbaarheidsgebrek: veiligheid en gezondheid],
[beschikbaarheidsgebrek: wet- en regelgeving],
Belang,
[AQL niveau]
FROM
[Data\06-01-2014\BB Ruimten 06-01-2014 (*).xlsx]
(
ooxml, embedded labels, table is Blad2);


concatenate


21052012:
LOAD

'2012' as YearFlag,

omschrijving as ruimte,
[voorlopig ruimtenummer:]
gebruikstijd ,
[beschikbaarheidsgebrek: comfort/binnencondities] ,
[beschikbaarheidsgebrek: functionaliteit en toegankelijkheid] ,
[beschikbaarheidsgebrek: representativiteit] ,
[beschikbaarheidsgebrek: veiligheid en gezondheid],
[beschikbaarheidsgebrek: wet- en regelgeving],
Belang ,
[AQL niveau]
FROM
[Data\21-05-2012\BB Ruimten 21-05-2012 (*).xlsx]
(
ooxml, embedded labels, table is Blad2);

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Try to concatenate the two years in the same table as Nirmal Raj says. Create a new field Year or YearFlag and assign the year to it.

Then for each individual field, create a bar chart with two dimensions (the field you're visualizing and the Year(Flag)) and an expression that counts the nummber of rows, like

=COUNT(Year)

(Do not use DISTINCT here)

Good luck,

Peter

Not applicable
Author

Thanks Nirmal Raj,

So a simple solution!

Not applicable
Author

Welcome