Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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