Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
kishoreravi1983
Contributor III
Contributor III

Fact Table with Mixed Granularity

Hi All

I have Set of 3 Tables

 Orders Tables:  Granularity at Date Level

Order Details: Granularity at Item Level for each Category

Sales Target Table: Month and Category: Target for Each Category is Set at Month level for multiple Years.

Need to Build a Data Model to measure the performance of Each Category Month wise.

Can any one help me how to build a Data Model with Mixed Granularity

Attached Data file

Thanks

Ravi

 

Labels (5)
1 Reply
zzyjordan
Creator II
Creator II

Hi, Kishoreravi

Please find the load scrtipt below

OrderList:
LOAD
"Order ID",
"Order Date",
"Customer Name",
City,
Country,
Region,
Segment,
"Ship Date",
"Ship Mode",
State,
MonthStart("Order Date") as "Month of Order Date"
FROM [lib://AttachedFiles/AmazingMartEU2.xlsx]
(ooxml, embedded labels, table is ListOfOrders);

Left Join (OrderList)

LOAD
"Order ID",
"Product Name",
Discount,
Sales,
Profit,
Quantity,
Category,
"Sub-Category"
FROM [lib://AttachedFiles/AmazingMartEU2.xlsx]
(ooxml, embedded labels, table is OrderBreakdown);

Left Join (OrderList)
LOAD
"Month of Order Date",
Category,
Target
FROM [lib://AttachedFiles/AmazingMartEU2.xlsx]
(ooxml, embedded labels, table is SalesTargets);

 

sample of result

Untitled.jpg

Hope this helps

ZZ