Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to create bar and line graph based on two data sources?

Hello,

I am trying to create a bar and line combo graph, but I cannot get it to work.  I have two data sources that I am in essence trying to include on the graph.

The graph's X-axis should show the MonthName and the Y-Axis should be the Count of events.  The Bar Graph should show the number of Diabetic Patient Visits [i.e., (If(Diab_Dx = 'Diabetes',1,0)) ]  and the Line Graph should show the number of COMPLETED tests [i.e., (If(Order_Status = 'Completed',1,0)) ].  Diab_Dx comes from one data source and Order_Status comes from a completely different data source.  I simply loaded both Files onto this QlikView document (not sure if I did this correctly).

Thanks in advance for any help.

The load script is:

POC_Results_Data:
LOAD

*,

Order_Date,
   
Year(Order_Date) AS Ord_Year,

     
MonthName(Order_Date) AS Ord_Month,

     
Day(Order_Date) AS Ord_Day,

FROM

POC_Results_Data.qvd

(
qvd);



Patient_Visits:

LOAD *    

    
Year(Visit_Date) AS Visit_Year,

     
MonthName(Visit_Date) AS Visit_Month,

     
Day(Visit_Date) AS Visit_Day,

    
if(WildMatch(Enc_Dx, '*Diabet*'), 'Diabetes',

     
if(WildMatch(Enc_Dx, '*'), 'Non-Diabetes',)) AS Diab_Dx

    
FROM



(
qvd);

1 Solution

Accepted Solutions
maxgro
MVP
MVP

try to associate the 2 tables by date (= year, month, day); in the second load change visit to ord

Year(Visit_Date) AS Ord_Year,
MonthName(Visit_Date) AS Ord_Month,
Day(Visit_Date) AS Ord_Day,

View solution in original post

2 Replies
maxgro
MVP
MVP

try to associate the 2 tables by date (= year, month, day); in the second load change visit to ord

Year(Visit_Date) AS Ord_Year,
MonthName(Visit_Date) AS Ord_Month,
Day(Visit_Date) AS Ord_Day,

Not applicable
Author

Thank you!