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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

source date key vs calender date key issue

hi folks,

whats wrong in the script

date key created by adding month and year from source as date key

iam trying to join source date key with calender date key

iam not getting the association

plz help me out

plz find sample qvw

4 Replies
anderslinden
Partner - Contributor III
Partner - Contributor III

Hi!
You have a few issues. First you need to have a daynumer. I tried using the invoicedate instead to get the link and it links. Your issue here is that invoice date is not always in the invoicemonth. You need to know how the user want to sort invoice dates into invoice month. The link works: date(InvoiceDate,'M/DD/YYYY') as DateKey

BI Consultant, Business Information Providers
www.bipab.se
Anonymous
Not applicable
Author

hi anders,

i have invoice year, invoice month field.

how can i achieve datekey by using makedate? to join with calender date

invoice month --3,4.........

invoice year 2002,2003,..............

help me out

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     You can use

     MakeDate([invoice year],[invoice month]) as Date

Celambarasan

anderslinden
Partner - Contributor III
Partner - Contributor III

hi
I can see that you have mixed ut the order between year and month. Change

date (makedate(InvoiceMonth, InvoiceYear) into

date (makedate(InvoiceYear,InvoiceMonth), 'M/DD/YYYY') as DateKey

/Anders

BI Consultant, Business Information Providers
www.bipab.se