Importing Data from a File

 

At this point in the example, you have entered and stored some data in the Current Year Budget cube for the United States, in January. The next exercise will populate the remaining detail Regions members by importing January data contained within a sample text file included with the PowerOLAP® application. This file, Qsdata.txt, is located in the C:\Program Files (x86)\PowerOLAP\Examples subdirectory (assuming that the C drive is where your Program Files directory is located) created during the installation process.

[Note that importing text data, along with entering data via a Slice or an Excel worksheet are two methods to bring data into PowerOLAP®. Another method is to dynamically integrate Meta and Fact Data from a relational database, via OLAP Exchange®.]

1.   With the QS Database opened, go to  Data tab, then in the Import control group select the and then Fact Data icon or Import Data command.
The Import Data dialog box is displayed.

2.   Click Browse to select the file to import and select the QSdata.txt file from the … \PowerOLAP\Examples subdirectory.

3.   Click Open. You are returned to the Import Data dialog box.

4.   Select a delimeter. In this case, keep Tab as the selected Delimiter.

5.   Click OK.

The Import Fact Data dialog box is opened. This dialog box shows the Dimensions that appear in the text file as well as in the selected Cube—into which you will import data. The Current Year Budget cube is selected.

6.   Click on the Months Dimension. The message box below appears.

7.   Click Yes to confirm that you want to continue.

Note that, in the Members list box, only January is selected for this Dimension; this is because the import file contains data for January only. If you click on the Accounts and Regions dimensions you will see that the import file contains data for several of their Members—but the data will only be for the month of January.

8.   Leave Set option as the Fact Data import method select.

9.   Click OK to begin the import process.
You will receive the following prompt indicating that the import was successful:

10. Click OK. You are returned to the Accounts by Months slice.

The fact data import is complete. You may want to create a slice to check the data imported.

11. From the PowerOLAP ribbon go to Slice tab then in the Slice control group click on the Open Slice command to access the Open Slice dialog box.

12. Select the appropriate cube from the dropdown (i.e., Current Year Budget).

13. Select the  Regions by Accounts slice and click OK.
Alternatively, you may simply double click on the appropriate saved slice.

The Regions by Accounts slice now opens and displays the data just imported.

The import file populated Net Sales and Cost of Sales data for January for all Members of the Regions dimension. PowerOLAP automatically calculated the cells at the intersection of Aggregate members (for example, Net Sales for Total Regions, etc.).

14. Click on the File icon and select Save Database command to save changes you made both to data and to Slice views.

15. Close the Regions by Accounts slice, leaving open the Accounts by Months slice.