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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Script doesn't work when applying filter

Hi guys,

I am loading an Excel file into Qlik Sense which consist information on High priority problems for multiple regions:

ORGINAL_PROBLEMS:
LOAD
Number,
Priority,
Region,
Date#(Date, 'DD/MM/YYYY') as Date,
Month(Opened) & '-' & year(Opened) AS Month,
IF(Priority <> '3 - Moderate' and Priority <> '4 - Low', IF(Date <> Previous(Date), 1, IF(Priority <> Previous(Priority), 1, 0)) , '0') as [Unique P1/2],
If(Priority = '1 - Critical' and Date <> Previous(Date), '1', If(Priority = '1 - Critical' and Priority <> Previous(Priority), '1', '0')) as [Unique P1]
FROM [lib://test/QS-Problems.xls] (biff, embedded labels, table is Problems$);

SORTED_PROBLEMS:
noconcatenate
load *
resident ORGINAL_PROBLEMS
order by Date asc;

drop table ORGINAL_PROBLEMS;

As you see I used script to convert data for date and month, sort data and add two IF statements to show 'event free days'.

It works fine until I use the filter , e.g. for Region to show data only for US.

Do you have any idea what I am doing wrong here?

0 Replies