Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Re: QlikView associative property is not working

Can you set the format on the numbers tab to date and see what you get

gayatri7
Contributor II

Re: QlikView associative property is not working

Its not working. Still am not getting the other months... Format.PNG

Highlighted
gayatri7
Contributor II

Re: QlikView associative property is not working

Guys,

I got the desired output. I was using below expression to create collectionmonth field, which takes the date from File name directly. (Devengo_Jan_2014)

date#(replace(mid(FileBaseName(),index(FileBaseName(),subfield(FileBaseName(),'_',2))),'_',' '),'MMM YYYY') as CollectionMonth

But when I did it manually by keeping  below expression for collectionmonth

makedate(2014,1) as CollectionMonth

it is working fine.

Thanks all for your help.

Not sure why it didn't work for 1st expression. If any one could explain me that it would be useful in future.

Siva_Sankar
Honored Contributor

Re: QlikView associative property is not working

Great! As suspected the date field is causing the issue.

Re: QlikView associative property is not working

You can try this if you wish to take the date from filename itself....

Date(Date#(SubField(FileBaseName(), '_', -2) & SubField(FileBaseName(), '_', -1), 'MMMYYYY'), 'MMM YYYY') as CollectionMonth

gayatri7
Contributor II

Re: QlikView associative property is not working

I used for that purpose only. But it was not getting appended. But when I used below expression it is working.

"makedate(2014,1) as CollectionMonth"



Just wondering what difference it is making!!!!

Re: QlikView associative property is not working

I am not sure what difference you are talking about, but make date is hard coding the value and the other one is picking the value from the file name.... that's the biggest difference between the two, but I think you might already know this, don't you?

gayatri7
Contributor II

Re: QlikView associative property is not working

Yes I know this. My doubt is when I am using Make date function ...all the data is getting appended correctly where as when I am using below expression ... though all data is getting appended (Can see from log file) but in front end it is only showing the 1st load statement data only. why??

Date(Date#(SubField(FileBaseName(), '_', -2) & SubField(FileBaseName(), '_', -1), 'MMMYYYY'), 'MMM YYYY') as CollectionMonth

Re: QlikView associative property is not working

For some unknown reason (or you can say because I am not sure how your qvds are getting created), the MMM YYYY looks right, but the underlying value is 01/01/2014 for all of them..... I am not completely sure what is going on, but that's how it is....

gayatri7
Contributor II

Re: QlikView associative property is not working

Thanks so much ...