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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
helen_pip
Creator III
Creator III

Moving expressions back to LOAD script

Dear Qlikview User

I have created  a page in my QVW which contains lots of expressions.  However this particular page does not have any user interaction, just static figures, so from a performance perspective I am thinking of moving the expressions back to the load script and just using the value in the expression

My expression is this:

Sum({<FactDate = {">=$(=MonthStart(max(AddMonths(FactDate,-1))<=$(=MonthEnd(max(AddMonths(FactDate,-1))))"},ED_Planned_Attendance_Flag = {'0'}, data_source = {'Main ED'}>}Breach_4hr_Wait_Flag)) /

(Count({<FactDate = {">=$(=MonthStart(max(AddMonths(FactDate,-1)))) <=$(=MonthEnd(max(AddMonths(FactDate,-1))))"},ED_Planned_Attendance_Flag = {'0'}, data_source = {'Main ED'}>}Unique_ID)), '##.##%')

However I am confused to how I will bring this expression together as the fields are coming from 3 different tables:

I.e.

Master_Calender table has FactDate

Main_Data table has data_source

Dim_ED has ED_Planned_Attendance_Flag, Breach_4hr_Wait_Flag


Master_Calender is linked to Main_Data on FactDate

Dim_ED is linked to Main_Data on Unique_ID

I require a small amount of guidance on where I should place my expression

Any help would be greatly appreciated

Kind Regards

Helen

1 Reply
ahaahaaha
Partner - Master
Partner - Master

Hi Helen,


It is somewhat difficult to express your opinion on your question without seeing your data. And yet I'll try.

1. You at the script level need to re-create one table of several, similar to the one you have in Table Chart of UI. For this purpose I would create a separate table that is not related to others tables (data island due to unique field names).

2. Your new table will be "assembled" from the successively connected source tables (Master_Calender, Main_Data etc.)

3. All the restrictions and selections that you see in the expression presented by you will be transferred to the line of the operator Where. For example,

LOAD

...

Resident Main_Data

Where FactDate >=MonthStart(max(AddMonths(FactDate,-1))) And...

4. There may be a need for some more code snippets, but in general the direction of action is described above.


Regards,

Andrey