Qlik Community

Qlik Sense Cloud Discussions

Not applicable

Functions are only working in first part of csv file

Hi!

I uploaded two csv files that represent sales for the months of April and May with exactly the same columns. I imported them using the automatic uploader, not the scripting one. As I have read in the documentation of qlik sense, if you upload 2 or more files with the same columns, qlik concatenates them automatically.

Now, I created a master dimension named month and executed the expression =Month(Date(Date, 'MM/DD/YYYY')) so that I could extract only the month of each transaction. The problem is, only the month of April is affected by this expression.

Any ideas about the problem?

Note: Date is timestamp

Screenshot from 2016-08-02 16:24:27.png

Tags (2)
1 Solution

Accepted Solutions
Not applicable

Re: Functions are only working in first part of csv file

UPDATE:

I already got the error. It was with csv files. For some reason, my excel files do not convert correctly to csv. Thanks for all the help. Appreciate it.

Regards,

Maiko Rugeria

5 Replies

Re: Functions are only working in first part of csv file

Hi,

It is because the Date coming from both excel is not in same format.

I can see from the screenshot that some of the date is not in date format. and Thus they are treated as text while loading. And on text you can not use the Month function directly.

Format your excel and select proper formatting for the Date field.

Regards,

Kaushik Solanki

Highlighted
Not applicable

Re: Functions are only working in first part of csv file

Thank you for your response! However, Both csv files' Date columns were uploaded in the same format. The left part became like that because I ran the expression stated above.

Re: Functions are only working in first part of csv file

Hi,

If possible post the sample data.

Regards,

Kaushik Solanki

Not applicable

Re: Functions are only working in first part of csv file

Here are samples of the csv files. I cannot post the actual. But the files go like these:

File 1:

Invoice_ID,Invoice_No,Transaction_Reference,Date,Status,Stock_no,Product_Name,Quantity,Retail_Price,Discount,Price,SubTotal,Average_Cost

6580103,280365,12-00443747,1-2-2016 5:19,Posted,216059,ProductA,1,5.5,,5.5,5.5,3.092099

6580125,280366,12-00443748,1-2-2016 5:27,Posted,12205403,ProductB,1,7,,7,7,5

File 2:

Invoice_ID1,Invoice_No1,Transaction_Reference1,Date1,Status1,Stock_no1,Product_Name1,Quantity1,Retail_Price1,Discount1,Price1,SubTotal1,Average_Cost1

7193416,292574,12-00455899,2-1-2016 0:02,Posted,8996001414002-IB,ProductA,1,9,,9,9,5.800333

7193416,292574,12-00455899,2-1-2016 0:02,Posted,2648,ProductD,1,19,,19,19,14.1

Not applicable

Re: Functions are only working in first part of csv file

UPDATE:

I already got the error. It was with csv files. For some reason, my excel files do not convert correctly to csv. Thanks for all the help. Appreciate it.

Regards,

Maiko Rugeria