Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I come across a challenge in Qlik sense scripting. I have a dataset in which there are 3 date columns such as, order_date, delivery_date, and review_date. My concern is to get all date columns in one date table. As of now, I am writing 3 resident load scripts for each column as shown below:
table_date:
Load order_date as date Resident table;
Load delivery_date as date Resident table;
Load review_date as date Resident table;
Is there any possibility that we can write a single resident load or minimal code to fetch all date columns from a single table plus all get concatenated into respective table under the date column?
you will need a cross table.
I have spent like 1 hour to understand how the cross table will solve this problem. Could you please elaborate so that I can connect the dots?
currently the info looks like:
OrderNo | order_date | delivery_date | review_date |
123 | 5/05/2023 | 12/06/2023 | 13/07/2023 |
based on the last line of your post, I understood what you were after was for the data to look like:
OrderNo | YourDateType | YourDate |
123 | order_date | 5/05/2023 |
123 | delivery_date | 12/06/2023 |
123 | review_date | 13/07/2023 |
assuming your data is in a table called 'details' below is the cross table example.
tmpData:
Crosstable (YourdateType,YourDate)
LOAD
OrderNo,
order_date,
delivery_date,
review_date
Resident details;
If I have misunderstood your requirement, could you please clarify what you are after.