cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding variable type mismatch

Former Member
0 Kudos

Hi

I was loading data in SAP PA 2.2 automated mode, and for some reason when I click the analysis button in Data description screen the tool can't recognise the date fields as date, it will take the date column as number. And If I manually edit the type to date and run the algorithm, the tool throws error. And sometimes it does recognise the date fields. I am taking data from flat excel files.

Want to understand is there any specific format of date for which the tool recognise it correctly?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos


Hi,

If the date variable is not recognized when clicking "Analyze", forcing it is not helpful. It means that Automated Analytics couldn't interpret the information correctly.

To change that, you need to go 1 step back (to the data source selection panel) and click on the Advanced Settings button :

Then, click on File Settings and check the box in front of Specify Date Format.  Specify from the list in which order Day, Month and Year are specified in your dataset and then enter the separator that is used as seen below.

Note that if your date variable is a string in a database and contains months names (e.g. "Jan" or "January"), it won't be possible to proceed this way. You'll need a real date variable and have to convert the string to a date or datetime.

In Excel, months may appear with their name but it's just a display option you can change so that numbers are displayed for months.

Hope this helps,

Armelle

Former Member
0 Kudos

Hey Armelle

When I clicked that icon you highlighted, I didn't find those settings. Did i skip any step? Please find the attached snapshot below..

achab
Product and Topic Expert
Product and Topic Expert
0 Kudos

same for me (XLS files). But I can see it for CSV files.

Former Member
0 Kudos

Hey Armelle

The above screenshot which I have pasted came when I opened the on of my file in .xlsx format. The solution suggested by you works for .CSV I guess. I converted the file from .xlsx to .csv and its working fine now. Many Many thanks!!

Answers (5)

Answers (5)

Former Member
0 Kudos

Though I will try the suggestions you have posted. Thanks

achab
Product and Topic Expert
Product and Topic Expert
0 Kudos

Which module are you using? Time series, other?

Thanks

Antoine

Former Member
0 Kudos

yes, time series

PPaolo
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello,

I can think of a couple of causes: Excel stores the dates as numbers and then displays as dates, there might be something wrong in the way one file is read by PA. Or you might have a single value badly written in one of the files which makes PA misunderstand the content.

Can you try and export both Excel files as CSV and look into them to check if the date fields are saved differently?

achab
Product and Topic Expert
Product and Topic Expert
0 Kudos

For time series, check http://help.sap.com/businessobject/product_guides/pa22/en/pa22_ts_user_en.pdf P9

I am not super clear why the same formats are not currently listed on both guides. This is being investigated by our documentation team. Anyway please stick to the formats in the time series guide and check that all Excel cells are formatted fine as highlighted by Pierpaolo.

Thanks

Antoine

Former Member
0 Kudos

Thanks guys for all the suggestions. I have to go through the suggestions.

But both the files are in CSV format. And for some reason now the tool is reconising the header row also as data now.

Antoine I m sending those two CSV files on your email Id. Please have a look

achab
Product and Topic Expert
Product and Topic Expert
0 Kudos

Thanks to Armelle, I was able to test the definition of date format on your files.

This is working fine. Screenshots 1 and 2 shows this for Data1.csv and screenshots 3 and 4 for Data2.csv.

Thanks & regards

Antoine

Former Member
0 Kudos

Thanks Antoine for trying it out for me

Former Member
0 Kudos

Hi Antoine

Thank you. I did go through the documentation. ActuallyI have  two excel files with different data sets. But the date column is same in both of them are same. However for one file the tool is recognising it as date and for the other one it is not recognising!

achab
Product and Topic Expert
Product and Topic Expert
0 Kudos

An option would be for you to post an extract of your Excel file with only this date column. So that I can give it a try.

achab
Product and Topic Expert
Product and Topic Expert
0 Kudos

In a nutshell, what you have to do is to change the format in Excel to adapt to the new format.

achab
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Please refer to p.29 of http://help.sap.com/businessobject/product_guides/pa22/en/pa22_class-clust_user_en.pdf

Kind ask to you for next time :-).

Can you please make sure to start in our help portal (SAP Predictive Analytics 2.2 – SAP Help Portal Page) and search in our documentation to see if you can find insights before posting ?

Thanks & regards

Antoine

achab
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Can you please screenshot or indicate what your date format looks like in your data source?

Thanks

Antoine