Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Create a dimension from existing dimension

Hello,

I have a doubt and i would need your help if possible...

I have one expression which is based on one existing dimension, but what i need is to create an expression based on that same existing dimension.

I am attaching the example. I have the expression that gives the result "COLOAD" or "SINGLE" andit is based on the existing dimension "Shipment ID". But what i need is this result ("COLOAD" or "SINGLE") to exist as a dimension based on the Shipment ID.

Is this possible ??

The thing is that i need to somehow have a way to exclude or not the co-loads from the Filling Rate % table, and i am not seeing any other way of doing it. What says if a shipment is coload or single is if the same Shipment ID has two  different warehouses or two different deliveries. That's why the expression is :

IF(COUNT(Warehouse)=2,'COLOAD','SINGLE')

I would really appreciate if someone could help me on this.... (file in attach)

Thanks

example.bmp

2 Replies
Not applicable
Author

Try using something like this in your load script, it should then link back to your shipmentID and allow you to use the 'Coload' field as a dimension.

Coload:
LOAD OQETRN as [External tracking number] ,
if(count(OQWHLO)>1,'Coload', 'Single') as 'Coload'
Resident MHDISL;

Not applicable
Author

Hello Leonard,

Thanks a lot for your help, i was not aware of the "Resident" function...

However i have have placed the code on the script but i got the following error:

Field not found - <OQWHLO>

LOAD OQETRN as [External tracking number]

if(count(OQWHLO)>1,'Coload','Single') as [Coload]

Resident MHDISL

I am not finding the reason for this mistake as the field OQWHLO is already defined...

Could you help me on this ?

Thanks a lot

Script error.bmp