# Get Data

This guide is designed to provide you with the steps to get data inside ValQ with the help of an example - the Sales Performance Dataset (you can download the file below). If you have not installed ValQ already, see the installation guide [here](https://docs.valq.com/introduction-to-valq/get-valq). You can also use your own datasets and follow the steps outlined.

{% file src="<https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2FlFDaR49T19zLwiF1iqfo%2FSales_Performance_Data.xlsx?alt=media&token=798ca273-4b61-47d8-8fba-bd5cdbc7ac02>" %}

{% hint style="info" %}
Excel dataset is used here for the purpose of illustration only. ValQ supports all formats of databases, platforms and data sources supported by Power BI.
{% endhint %}

## Step-by-Step Guide

Let us learn how to get data inside ValQ to build models.

1. Add the visual
2. Import data from Excel
3. Assign your data fields to ValQ

### 1. Add the visual

The first step to using ValQ is to add it to the Power BI canvas. Click on the ValQ icon in the visualization pane.&#x20;

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2F3EY8oEvoZEezDZk9V8QU%2Fimage.png?alt=media&#x26;token=6f532162-a54f-47d6-98dd-178d80ee6ec0" alt=""><figcaption><p><strong>Select ValQ</strong></p></figcaption></figure>

Resize it to fill the entire screen.

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2Frbo6weYqFeV7W95nzC6b%2Fimage.png?alt=media&#x26;token=42ad524c-f502-48c1-817d-8d460ccfe154" alt=""><figcaption><p><strong>Resize ValQ to Fullscreen</strong></p></figcaption></figure>

### 2. Import data from Excel

We have a simple columnar dataset as shown below that measures sales performance across regions, and product categories & with respect to sales representatives.

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2F0GUXicN0gPj9qgcXVd3t%2Fimage.png?alt=media&#x26;token=a7b8a781-1c4e-4b4e-b4f7-2405e297be9a" alt=""><figcaption><p><strong>Sample Data</strong></p></figcaption></figure>

This is a columnar dataset as the data is stored in columns instead of rows. Download the dataset using the above link and try it yourself.

1. To import this data into Power BI, go to **Get Data** in the toolbar. Now choose **Excel Workbook** to import the sales data. The process is the same as importing any data to Power BI.

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2FcLfVxMw52seYJN2HbOXc%2Fimage.png?alt=media&#x26;token=0b9c5453-b3da-45a8-93b7-7c8eeaff071f" alt=""><figcaption><p><strong>Get Data from Excel</strong> </p></figcaption></figure>

{% hint style="info" %}
ValQ consumes data the best when it is structured in **columnar** format. If the data is of any other structure such as a Crosstab, convert the data into columns at the source as a best practice. You can also use Power BI Query Editor to transform the data before loading it to ValQ.
{% endhint %}

2. Go to the file location and select the file to be imported. Click **Open.**

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2F90yqq711SnnsTsLn7Mm4%2Fimage.png?alt=media&#x26;token=8d1a8715-bb1b-4896-8cfe-98b2526525bc" alt=""><figcaption><p><strong>Select Excel File through System Dialog Box</strong></p></figcaption></figure>

3. Select the *Sales Data(Columnar)* checkbox to preview the dataset and click **Load.** No transformation is required for this data as it is already prepared.

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2FzBaE9VDxDJsDIhVAO849%2Fimage.png?alt=media&#x26;token=e4e7176e-e613-4204-8a2c-f326c5eafa75" alt=""><figcaption><p><strong>Preview and Load Data</strong></p></figcaption></figure>

4. You will now see the dataset under the **Data** pane on the right.

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2Fp8gJzWnwYf1qKYdjQrw4%2Fimage.png?alt=media&#x26;token=4e9d2bad-c8e5-49be-bc9a-b3b55889c3c6" alt=""><figcaption><p><strong>Loaded Dataset</strong> </p></figcaption></figure>

### 3. Assign your data fields to ValQ

Now that you have the data imported, the next step is to assign them to the appropriate fields. The available fields include **Category**, **Time Period**, **Values** and **Others.**

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2FtPKhvIAvyu27bPsaLyWN%2Fimage.png?alt=media&#x26;token=2f834508-5ba3-40bd-8efc-1862412ec0bb" alt=""><figcaption><p><strong>Assign Data Fields</strong></p></figcaption></figure>

1. Assign *Category* and *Region* in **Category** field.&#x20;
2. Then add *Month* in the **Time Period** field.&#x20;

{% hint style="info" %}
The example showcased here has a hierarchical time format and hence time interval mapping is not required. ValQ accepts non-hierarchical time periods as well. Refer to [this section](https://docs.valq.com/global-settings#1.3.-time-interval-mapping) to know more.
{% endhint %}

3. *Sales Budget* and *Sales Forecast* are added to the **Values** field.&#x20;
4. You can also assign one of these values to the **Others** field. They would not become a part of the data series but can be used in formulae in the Model tab and for weight distributions in the Plan tab.

For example, in the below image, the *Sum of Sales Budget* is assigned to the **Others** field instead of the **Values** field. This makes the series unavailable in the visual - in Plan, Simulate and Report tabs. However, in Model tab, you can refer to this series in formula calculations.

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2FVWUYftFGBbXbczleeE1b%2Fimage.png?alt=media&#x26;token=93a39173-5d93-4789-86b9-794cd36f6ca1" alt="" width="344"><figcaption><p><strong>Others Field</strong></p></figcaption></figure>

**Note:**

1. In the **Category** field, you can assign the category names, sub-categories and other heads under which you want the data to be categorized.
2. In the **Time Period** field, you can assign the time frame in which your data has been aggregated like Year, Quarter, Month, Week, Days, etc., Both hierarchical and non-hierarchical time formats are accepted.

{% hint style="info" %}
ValQ accepts non-hierarchical custom time formats like FY2023, 23, Qtr1, Jan, etc. and for the visual to consume data in such time formats use the **Time Interval Mapping** feature as explained in [this section](https://docs.valq.com/global-settings#1.3.-time-interval-mapping).&#x20;

You can also split the data series by year using the [Split Series by year](https://docs.valq.com/global-settings#1.2.1.-series-manager) option.
{% endhint %}

3. All the numerical value columns that you want to aggregate can be assigned to the **Values** field.
4. Assign data in the **Others** field which you do not want to be added as an exclusive data series but want it to be still available for formula calculations and weight distributions.

You have now imported your data to ValQ. Take some time to explore further. In the next section, let us learn the steps to create a model.

**Resources**

[**How to use Cross-Tab Data for ValQ Model in Microsoft Power BI**](https://valq.com/webinars/how-to-use-cross-tab-data-for-valq-model-in-microsoft-power-bi/)

[**Create ValQ Model in Microsoft Power BI with 2 FACT Tables**](https://valq.com/webinars/create-valq-model-in-microsoft-power-bi-with-2-fact-tables/)

**Note:** While the resources above are from previous versions of ValQ, the information available also applies to the current version of ValQ - Plan.

ValQ packages a few inbuilt examples as samples. To explore more such models and use cases, visit [Demos](https://valq.com/demos).
