I have the following 2 tables:
[GP_BMI]:
LOAD
gp_event_id as all_events_event_bmi,
gp_dataElement as gp_height_bmi_de,
gp_de_value as gp_height_bmi_value,
'GP' as gp_height_bmi_stage
Resident GP
WHERE gp_dataElement='vOIPn23yOcr'
AND gp_status='COMPLETED';
LEFT JOIN (GP_BMI)
LOAD
gp_event_id as all_events_event_bmi,
gp_dataElement as gp_weight_bmi_de,
gp_de_value as gp_weight_bmi_value
Resident GP
WHERE gp_dataElement='xNkRaZUG7fI'
AND gp_status='COMPLETED';
I am left joining here because I need both height and weight fields having IDs of vOIPn23yOcr
and xNkRaZUG7fI
respectively to be displayed horizontally in the table, because they come in a vertical way from the database source.
The second table is as follows:
[NUTRITION_BMI]:
LOAD
nutrition_event_id as nutrition_all_events_event_bmi,
nutrition_dataElement as nutrition_height_bmi_de,
nutrition_de_value as nutrition_height_bmi_value,
'Nutrition' as nutrition_height_bmi_stage
Resident Nutrition
WHERE nutrition_dataElement='vOIPn23yOcr'
AND nutrition_status='COMPLETED';
LEFT JOIN (NUTRITION_BMI)
LOAD
nutrition_event_id as nutrition_all_events_event_bmi,
nutrition_dataElement as nutrition_weight_bmi_de,
nutrition_de_value as nutrition_weight_bmi_value
Resident Nutrition
WHERE nutrition_dataElement='xNkRaZUG7fI'
AND nutrition_status='COMPLETED';
Now I want to join these tables vertically
in this case to display it in Qlik Sense
table:
LOAD * Resident [PEDIATRIC_BMI];
JOIN(GP_BMI)
LOAD * Resident [NUTRITION_BMI];
But the result was horizontal display.
I tried:
LOAD * Resident [PEDIATRIC_BMI];
Concatenate(GP_BMI)
LOAD * Resident [NUTRITION_BMI];
And got the same table where all fields are displayed horizontally. But I need them vertically when combining tables as each table represent a stage.