Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
KommulaRahul
Contributor III
Contributor III

I have fields like customer segment, Products, shipped date, Order Date, Product Id, Sales, Profit

I need to split these fields into two tables at back end side(load editor). 

I need to see these two tables in data model viewer

What is the script I need to add in back end 

Labels (1)
1 Solution

Accepted Solutions
BrunPierre
Partner - Master
Partner - Master

To link these tables, perhaps something like this.

BrunPierre_1-1687972498314.png

NoConcatenate
Dimensions:
LOAD ProductID,
CustomerSegment,
Product,
OrderDate,
ShippedDate
Resident MainTable;

Measures:
LOAD ProductID,
Sales,
Profit
Resident MainTable;

DROP Table MainTable;

View solution in original post

7 Replies
BrunPierre
Partner - Master
Partner - Master

Hi, @KommulaRahul Can you share more information about what you are trying to do?

KommulaRahul
Contributor III
Contributor III
Author

Ok i will send u the pic of the sample dataset . 

These fields need to be split into two tables. 

For that what I need to add in the load editor? 

16879421319491736722349381369802.jpg

BrunPierre
Partner - Master
Partner - Master

Is it what you looking for?

BrunPierre_0-1687953851154.png

BrunPierre_2-1687954154696.png

QUALIFY *;
T1:
LOAD CustomerSegment,
     Trim(SubField(Product,'-',1)) as Product,
     OrderDate,
     ShippedDate,
     Sales,
     Profit,
     ProductID
Resident MainTable;

T2:
LOAD CustomerSegment,
     Trim(SubField(Product,'-',2)) as Product,
     OrderDate,
     ShippedDate,
     Sales,
     Profit,
     ProductID
Resident MainTable;

DROP Table MainTable;
KommulaRahul
Contributor III
Contributor III
Author

Thanks for the response

But i want few fields like customer segment, product, product ID, shipped date, order date in one table 

And sales ,profit in  one table. 

Dimensions in one table

Measures in one table 

Also is there any possibility to link these two tables

BrunPierre
Partner - Master
Partner - Master

I should have asked from the very start why the split and then associate them afterwards. Perhaps, you could post the output you expect.

KommulaRahul
Contributor III
Contributor III
Author

Sorry @BrunPierre 

I forgot to mention about my requirement completely at the starting

The output what I'm expecting is 

Among those fields 

Few are dimensions and two are measures

So I want dimensions (CustomerSegment, Product, Product ID, Shipped Date, OrderDate) in one table and measures (Sales, Profit) in one table . 

Did u understand the requirement? 

 

 

BrunPierre
Partner - Master
Partner - Master

To link these tables, perhaps something like this.

BrunPierre_1-1687972498314.png

NoConcatenate
Dimensions:
LOAD ProductID,
CustomerSegment,
Product,
OrderDate,
ShippedDate
Resident MainTable;

Measures:
LOAD ProductID,
Sales,
Profit
Resident MainTable;

DROP Table MainTable;