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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Multiple Dates in Qlikview Apps

Hello All,

I am working on a QV application where I am having multiple date for multiple analysis say,

Admission Date for Admission Analysis

Drop Out Date for Drop Out Analysis

Pass Out Date for Pass Out Analysis

Attendance Date for Attendance Analysis

Is this possible to combine all these dates and make a unique date from these dates to use in QV application?

Regards,

Balraj

11 Replies
ashfaq_haseeb
Champion III
Champion III

Anonymous
Not applicable
Author

Ashfaq,

Could you help me to understand this syntax:

Applymap('OrderID2OrderDate',OrderID,Null()) as CanonicalDate


Regards,

Balraj

ashfaq_haseeb
Champion III
Champion III

HI,

Load OrderLineID, Applymap('OrderID2OrderDate',OrderID,Null()) as CanonicalDate, 'Order' as DateType

          Resident OrderLines;

It will map OrderID null if not find then it will map with Order date

Regards

ASHFAQ

Anonymous
Not applicable
Author

So, you mean to say:

Null() will keep the OrderID null and if OrderID is not null than it will map only OrderDate

Is it so?

In my case, it is keeping all the values null except one date say Shipped date only...

Why It is so?

Regards,

Balraj

Anonymous
Not applicable
Author

Applymap('OrderID2OrderDate',OrderID,Null())

What is this 'OrderID2OrderDate'?

As per Applymap() syntax, it should be table name.

Regards,

Balraj

its_anandrjs
Champion III
Champion III

In the Expression Applymap('OrderID2OrderDate',OrderID,Null())

1. 'OrderID2OrderDate' is a table name (Mapping Table)

2. OrderID is a Field name

3. Null() is used if some value not matched with the OrderID then fill with the Null values

parthiband
Partner - Creator
Partner - Creator

Hi Balraj,

Applymap('MapName','Key Field used to map a value','If Key field value not found,then use the value here')

MapName (OrderID2OrderDate) ->

Its nothing but a mapping table name.

Key Field used to map a value (OrderID) ->

In the Mapping table(OrderID2OrderDate) you can have ONLY two fields(Field1 and Field2) and the first field SHOULD be the KEY FIELD ie., OrderID in your case.

If u use ApplyMap() function, it searches for the Key field in the target table where u use the applymap function and deploy the values(Field2).

If the Field1(KeyField) is not found, by default it will put the Keyfield value.

Else, if u given as null() or any text, it will be displayed over there.

Thanks

Anonymous
Not applicable
Author

Hello,

LinkTable:

load #StudentID_LinkTable,

     DateOfAdmission as LinkDate,

     'Admission' as DateType

     Resident StudentMaster;

load #StudentID_LinkTable,

     ApplyMap('StudentMaster',%ARStudentID, null()) as LinkDate,

     'Alumnis' as DateType

     Resident StudentMaster; 

load #StudentID_LinkTable,

     ApplyMap('StudentMaster',#ARStudentID, null()) as LinkDate,

     'DropOut' as DateType

     Resident StudentMaster;

In my case, except Admission all values are null.

Why it is so?

Regards,

Balraj

parthiband
Partner - Creator
Partner - Creator

Except 'Admission' no data will be having those student id or

Your ApplyMap() function might be wrong

If u say, the above is ur script.

I will say, it is wrong.

The script should be,

LinkTable:

load #StudentID_LinkTable,

     DateOfAdmission as LinkDate,

     'Admission' as DateType

     Resident StudentMaster;

load #StudentID_LinkTable,

     ApplyMap('StudentMaster',#StudentID_LinkTable, null()) as LinkDate,

     'Alumnis' as DateType

     Resident StudentMaster;

load #StudentID_LinkTable,

     ApplyMap('StudentMaster',#StudentID_LinkTable, null()) as LinkDate,

     'DropOut' as DateType

     Resident StudentMaster;

Thanks,