Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
jbchurchill
Creator
Creator

Loading Data from a previous section into Qlik Sense for a calculated field

I'm trying to understand what is wrong in the data load process (I probably need some clarification regarding what is happening in the SQL Select section vs. in the "LOAD" section).

GOAL: to have a calculated field that calculates values using 2 fields that come from different data sources
I will use the calculated field in a filter pane. One of those is already a calculated field.

Fields: "close_date" is a field in the "Staff" table. "days_open" is in the "Services" table.

In the Data Load (for Staff😞

If(IsNull("close_date"), '', Date(Date#("close_date") - open_date)) as new_days_open,

 new_days_open is the field I ultimately want to use.

In the Data Load for "Services":

if(ndo ='', 'White (Completed)', if(days_open < 9, 'Green (Not yet expired)', if(days_open < 15, 'Yellow (Expires in 5 days)', if(days_open >= 15, 'Red (Open & Expired)')))) as expstatus,

 

Before that code though, I have this section in the load where I'm attempting to bring in new_days_open (which successfully loads the data in the "Staff" section of the data load so I thought I could re-use it this way in the "Services" section which is where my screenshot is from.

jbchurchill_0-1625603714264.png

The unfortunate result is that ndo is nothing (count is zero) whereas new_days_open has the records I'm trying to use and I cannot seem to go across the two data sources to get the "expstatus" calculated field result that I want.

I realize this is a bit complicated but I'm hoping for advice or answers to at least help me figure out what I'm doing that is breaking it (providing a path forward would, of course, also be a big help).

I doubt if it matters but both data sources are coming from the same type of Rest Service but in different data sources (different datasets) just to provide further background. 

Labels (2)
0 Replies