Download Free Trial
  1. Getting started
    1. Quickstart
    2. System requirements
    3. Managing license keys
    4. Updating to the latest version
    5. Typical errors
    6. Migration guide
    7. Installation troubleshooting
  2. JSON data source
    1. Data types in JSON
  3. CSV data source
    1. Data types in CSV
  4. Connecting to SQL database
    1. Connecting to database with .NET
    2. Connecting to Relational Database with .NET Core
    3. Connecting to database with Java
    4. Connecting to database with PHP
  5. Connecting to Microsoft Analysis Services
    1. Getting started with Accelerator
    2. Installing Accelerator as a Windows Service
    3. Configuring username/password protection
    4. Configuring secure HTTPS connection
    5. Troubleshooting
  6. Connecting to Pentaho Mondrian
    1. Getting started with Accelerator
    2. Configuring Mondrian roles
    3. Сonfiguring username/password protection
    4. Сonfiguring secure HTTPS connection
    5. Troubleshooting
  7. Connecting to icCube
  8. Configuring report
    1. Data source
    2. Slice
    3. Options
    4. Number formatting
    5. Conditional formatting
    6. Set report to the component
    7. Get report from the component
    8. Date and time formatting
    9. Calculated values
    10. Custom sorting
  9. Integration
    1. Integration with AngularJS
    2. Integration with Angular 2
    3. Integration with Angular 4
    4. Integration with React
    5. Integration with RequireJS
    6. Integration with TypeScript
    7. Integration with ASP.NET
    8. Integration with JSP
    9. Integration with PhoneGap
  10. Integration with charts
    1. Integration with Highcharts
    2. Integration with FusionCharts
    3. Integration with Google Charts
    4. Integration with any charting library
  11. Customizing toolbar
  12. Customizing appearance
  13. Localizing component
  14. Global Object
  15. Export and print
  16. API reference - JavaScript
  17. API reference - Flex
Table of contents

Data types in CSV

Using CSV data source you can indicate how data will be interpreted by Pivot table component. For this, you can use special prefixes for columns names. Pivot table has the following prefixes for CSV files:

  • + means that field is a dimension.
  • - field is a value.
  • m+ this prefix will indicate that the field is a month.
  • w+ to indicate that the field is a day of the week.
  • d+ field is a date. Such field will be split into 3 different fields: Year, Month, Day. Date formats that are supported by Pivot table is described below.
  • D+ field is a date. You will see such date as a hierarchy: Year > Month > Day.
  • D4+ field is a date. You will see such date as a hierarchy: Year > Quarter > Month > Day.
  • ds+ field is a date. Such field will be formatted using date pattern (default is dd/MM/yyyy)
  • t+ field is a time (measure). Such field will be formatted using HH:mm pattern
  • dt+ field is a date (measure). Such field will be formatted using dd/MM/yyyy HH:mm:ss pattern
  • id+ field is an id of the fact.

Here is the minimal CSV file which will treat Year as dimension, rather than numeric measure:

Country, +Year, Sales 
US, 2010, 200 
UK, 2010, 100

Supported date formats

To make date column be interpreted as date, you should use prefixes d+, D+ and D4+ for CSV columns. Besides, data from these columns should have special date format to be understood properly.
The component supports ISO 8601 date (other formats may be used, but results can be unexpected). For example, "2016-03-20" (just date) or "2016-03-20T14:48:00" (date and time).

Here is an example of the CSV file with date columns – Date1 and Date2:

Size, Discount, d+Date1, D+Date2
214 oz, 14, 2009-11-01, 2009-11-09
214 oz, 12, 2010-12-09, 2009-12-09
212 oz, 36, 2009-09-01, 2009-12-01
212 oz, 27, 2009-09-01, 2010-12-02
212 oz, 18, 2010-11-09, 2009-12-11
212 oz, 16, 2009-09-01, 2009-12-20

The pivot table based on this CSV will look as follows:

As you can see, Date1 column with prefix d+ is split into three separate fields — Year, Month, Day. In Pivot component it will look as follows:

Date2 column with D+ prefix is interpreted as a hierarchy that can be drilled down to months and days.