Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

creating a fact, need some help :)

Hello,

well my question is the following:

I have muttile dimensions.. four in total. These dimensions have to create a new table (fact) My problem is, that I don't know how to connect these dimentions, because they are from 2 different databases and 1 is from a tekst file (.csv)

If you want to help me and need anny of the files, you can contact me on vgroenheijde@gmail.com thanks in advance!!!

here is my query

SET ThousandSep=',';

SET DecimalSep='.';

SET MoneyThousandSep=',';

SET MoneyDecimalSep='.';

SET MoneyFormat='$#,##0.00;($#,##0.00)';

SET TimeFormat='h:mm:ss TT';

SET DateFormat='M/D/YYYY';

SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';

SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';

ODBC CONNECT32 TO [MS Access Database;DBQ=C:\Users\Vincent\Desktop\DH-BI-5\QlikviewData\Qlikview\BI5data\GO\GO_SALES\go_sales.accdb];

Product:

SQL SELECT

p.PRODUCT_NAME as product_name,

p.PRODUCT_NUMBER as product_number,

t.PRODUCT_TYPE_EN as product_type_name,

l.PRODUCT_LINE_EN as product_line_name

FROM (product p

Inner Join product_type t on p.product_type_code = t.product_type_code)

Inner Join product_line l on t.product_line_code = l.product_line_code;

Salesstaff:

SQL SELECT

  LAST_NAME,

    POSITION_EN as position_name,

    SALES_BRANCH_CODE,

    SALES_STAFF_CODE

FROM sales_staff;

Year:

Directory;

LOAD YEAR as year_nr

FROM

[..\..\..\Desktop\DH-BI-5\QlikviewData\Qlikview\BI5data\GO\GO_SALES\GO_SALES_PRODUCT_FORECASTData.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

ODBC CONNECT32 TO [MS Access Database;DBQ=C:\Users\Vincent\Desktop\DH-BI-5\QlikviewData\Qlikview\BI5data\GO\GO_CRM\go_crm.accdb];

Retailer:

SQL SELECT

s.RETAILER_SITE_CODE as retailer_site_code,

s.CITY as city,

r.RETAILER_CODE as retailer_code,

r.COMPANY_NAME as company,

t.RETAILER_TYPE_CODE as retailer_type_code

FROM (retailer_site s

Inner Join retailer r on s.retailer_code = r.retailer_code)

Inner Join retailer_type t on r.retailer_type_code = t.retailer_type_code;

1 Reply
Not applicable
Author

Hi Vinny

First you need to have some fields in common on your tables... So that they could get related.

Example

You have some sales

Sales:

LOAD

OrderID,

ProductID,

Sales

From …….

Notice that I have ID´s so that they could get related with a Product table

Products:

LOAD

ProductID,

Product,

Product_Desc

From . . . . . .

So you need to identify those keys and put them the same name.

Best Regards!