# Data Formats

Galdera accepts data in two layouts, wide and long, and detects which one you're using. Whichever layout you use, Galdera also needs a date column and can take any categorical column as a dimension.

## Wide and long formats

| | Wide format (also called pivot format) | Long format |
|---|---|---|
| **Layout** | Each numeric column becomes its own measure. | One column holds the measure names, and another holds the values. |
| **Example** | Columns named "revenue", "costs", and "units" create three measures. | A "metric" column with values such as "Revenue", "Costs", and "Units", paired with a "value" column. |
| **Best for** | Spreadsheets with one row per time period and several value columns. | Data from an ETL system or a database export. |

## Dimensions

Dimensions work the same way in both formats. You can select any categorical column, such as Region, Product, or Department, as a dimension when you map columns. Galdera creates the dimension values from the distinct entries in that column.

## Date column

Galdera needs to know which column holds your dates so it can forecast over time.

* Common column names are "date", "month", "quarter", and "period".
* Use a standard date format, such as 2024-01-01 or Jan 2024.
* For Snowflake sources, select a native `DATE` or `TIMESTAMP` column. If your dates are stored another way, create a view that casts them before you connect it.

### Cohorted measures in chat

A cohort file has a cohort date (when a cohort starts) and a report date (when its value is observed). Review files with more than one date column to confirm each column's role. The assistant doesn't create a source from a cohort file, and doesn't load one into a source that isn't set up for its cohort date. To import a cohort file, set up a cohort source on the source page.
