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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Rose1
Contributor II
Contributor II

Matching Fields from EXCEL and another DATABASE

Hello ,

I am trying to match fields from excel file and an already existing script on QlikSense , so when I use a filter field it will filter on both data from excel and from  the other database  , It's working with full name , I can filter using it , but  not for Year or any other date field in both matser calendar and my Excel table ,  it will only filter on values from the excel file 

Excel:

LOAD
"Full Name",

"Year",
Quarter as "QuarterYear",

FROM [lib://AttachedFiles/Names _Final.xlsm]
(ooxml, embedded labels, table is DataBase);

and here is the other script 

 

Name_TABLE:
LOAD
"full name",
"Present",
"Product",

"Date"


FROM [lib://Document/PRODUCT.qvd]
(qvd);

 

MasterCalendar:
ADD Load

TempDate AS Date,

week(TempDate) As Week,

Year(TempDate) As Year,

Month(TempDate) As Month,

Day(TempDate) As Day,

YeartoDate(TempDate)*-1 as CurYTDFlag,

YeartoDate(TempDate,-1)*-1 as LastYTDFlag,

inyear(TempDate, Monthstart($(varMaxDate)),-1) as RC12,

date(monthstart(TempDate), 'MMM-YYYY') as MonthYear,

ApplyMap('QuartersMap', month(TempDate), Null()) as Quarter,

Year(Date#(TempDate, 'DD/MM/YYYY')) & 'Q' & Ceil(Month(Date#(TempDate, 'DD/MM/YYYY'))/3) as QuarterYear,

Dual(Year(TempDate)&'-Q'&Num(Ceil(Num(Month(TempDate))/3)),QuarterStart(TempDate)) as YearQuarter,

Week(weekstart(TempDate)) & '-' & WeekYear(TempDate) as WeekYear,

12*Year(Today())+Month(Today())-12*Year(TempDate)-Month(TempDate) AS [MonthsAgo] ,

4*Year(Today())+Ceil(Month(Today())/3)-4*Year(TempDate)-Ceil(Month(TempDate)/3) AS [QuartersAgo] ,

Year(Today())-Year(TempDate) AS [YearsAgo] ,




If (DayNumberOfYear(TempDate) <= DayNumberOfYear(Today()), 1, 0) AS [InYTD],

WeekDay(TempDate) as WeekDay

Resident TempCalendar

Order By TempDate ASC;

 

Thanks in advance , 

Labels (1)
2 Replies
Or
MVP
MVP

If you want only values that exist in both loads, you should be using INNER JOIN, not LEFT JOIN.

https://help.qlik.com/en-US/qlikview/May2021/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptP...

 

Rose1
Contributor II
Contributor II
Author

Hello , thank you for your answer but this is not really the issue I have updated my post to make it more clear .