Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
gayatri7
Creator II
Creator II

QlikView associative property is not working

Hi,

I have same file for 3 different months with same fields. When I am loading the data in QlikView, It should get appended automatically as per Qlikview associative property. But it is not working as expected.

Even after writing the 'Concatenate ' keyword still it is not working.

Could any one let me know what is wrong here.

Attaching the QVD and Raw files for different month.

Just for a check, Once I load the data I should get CollectionMonth as Jan, Feb and Mar

20 Replies
sunny_talwar

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

gayatri7
Creator II
Creator II
Author

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

gayatri7
Creator II
Creator II
Author

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
Master II
Master II

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

sunny_talwar

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
Creator II
Creator II
Author

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!!!!

sunny_talwar

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
Creator II
Creator II
Author

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

sunny_talwar

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
Creator II
Creator II
Author

Thanks so much ...