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

Dual() syntax (not working)

Gents,


Is there something wrong in the syntax below? The 'status' is blank is the resulting table


[Funnel2_order]:

LOAD


status as status_noorder,

DUAL(status,Funnel2_order) as status


INLINE

[

status,Funnel2_order

order_created,1

order_ready,2

order_accepted,3

order_sale,4

order_delivered,5

order_cancel,6

](delimiter is ',');



Thank you!

4 Replies
petter
Partner - Champion III
Partner - Champion III

This works perfectly fine for me. Do you have some information on how the table has been created? Dimensions and Measures?

ziabobaz
Creator III
Creator III
Author

Thank you, I think there is a mistake later in the script - maybe it is somehow connected with the dual nature of the status field?

Concatenate(Main_table) //table loaded earlier


LOAD

text(status) as status_noorder,

    ;


[05_results_order_statuses]:

SELECT

status

FROM `dataset1.05_results_order_statuses`;



Left Join (Main_table) // here i want to replace status_noorder with the status from the first table

Load *

RESIDENT [Funnel2_order];

DROP TABLE [Funnel2_order];

Drop Field status_noorder From Main_table;

ziabobaz
Creator III
Creator III
Author

still struggling with Dual:

Funnel2_order:

Mapping

LOAD

*

INLINE

[

funnel_status,step

order_created,1

order_ready,2

order_accepted,3

order_sale,4

order_delivered,5

order_cancel,6

];

StatusTable:

LOAD

dual(status,ApplyMap('Funnel2_order',status)) as status, // option1

ApplyMap('Funnel2_order',status) as status // option 2

RESIDENT X;

Neither of above options work. The result is just the plain text 'status' field.

Please, correct me if i am wrong: in my case applymap finds the Funnel2_order table, takes the first column funnel_status, maps it with the status field from my second load and returns the second column step (number). Is that correct?

ziabobaz
Creator III
Creator III
Author

I think it was memory issue or somethinbg - i rebooted everything and the script worked!