Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to transform data to table which summaries the total occurrence count of each values.
can someone put some light on it?
input data
Input Data | |||
Field1 | Field2 | Field3 | Field4 |
B | A | C | D |
A | B | F | X |
C | A | F | H |
A | B | C | D |
D | E | F | A |
Expected output
Output | |
A | 5 |
B | 3 |
C | 3 |
D | 3 |
E | 1 |
F | 3 |
X | 1 |
Hi, this:
input_data:
LOAD 1 as temp_qualifier_field ,* INLINE [
Field1|Field2|Field3|Field4
B|A|C|D
A|B|F|X
C|A|F|H
A|B|C|D
D|E|F|A
] (DELIMITER IS '|');
temp_output:
CROSSTABLE(field_from,values,1)
LOAD * RESIDENT input_data;
output:
LOAD
values,
COUNT(values) AS occurance_count
RESIDENT temp_output
GROUP BY values;
DROP TABLE temp_output;
DROP FIELD temp_qualifier_field;
Hi, this:
input_data:
LOAD 1 as temp_qualifier_field ,* INLINE [
Field1|Field2|Field3|Field4
B|A|C|D
A|B|F|X
C|A|F|H
A|B|C|D
D|E|F|A
] (DELIMITER IS '|');
temp_output:
CROSSTABLE(field_from,values,1)
LOAD * RESIDENT input_data;
output:
LOAD
values,
COUNT(values) AS occurance_count
RESIDENT temp_output
GROUP BY values;
DROP TABLE temp_output;
DROP FIELD temp_qualifier_field;
Thanks its works, is it possible to perform similar output using chart expression instead of script data loading?