Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
alan2
Contributor
Contributor

API load not producing expected results - Join () not working

Hi All

I have been updating the Qlik Sense script form loading directly from .csv files to connecting to a server through the REST API (JSON).

All the sections have been changed and work correctly with 1 exception. The simplified and anonymized load script that is not working is below (but still produces the same issue).

Main4:

LOAD   

              [_id],

              [__KEY_root] AS [Key_community1]

RESIDENT RestConnectorMasterTable

WHERE NOT IsNull([__KEY_root]);

 

[BCC_in_community]:

Join (Main4)

LOAD   

             

              [Consultation_type] as [new_repeat], 

    'Male' as Gender, //Father is assumed to be male in data collection forms but requires a separate field for visualization

    [counselling_father] AS [counselling],

              [__FK_BCC_in_community] AS [Key_community1]

RESIDENT RestConnectorMasterTable

WHERE NOT IsNull([__FK_BCC_in_community]);

 

[BCC_in_community]:

 

Join (Main4)

LOAD   

             

    [Consultation_type] as [new_repeat],

    'Female' as Gender, //mother is assumed to be female in data collection forms but requires a separate field for visualization

              [counselling_mother] AS [counselling],

              [__FK_BCC_in_community] AS [Key_community1]

RESIDENT RestConnectorMasterTable

WHERE NOT IsNull([__FK_BCC_in_community]);

 

In the visualization, only the male data is displayed and the female data is 0. However, if I  reverse the order in the load script (load the mother first), then only the female will be displayed and the male data is 0. I assume the SQL select script is ok because the data is loaded for both male and female, depending on which section of script comes first. It is such a simple script, there must be a simple explanation and I hope a simple solution.

I hope someone can explain it to me.

A

 

Labels (2)
0 Replies