4 Replies Latest reply: Feb 16, 2018 3:17 AM by Massimo Favaro RSS

    Calculated field based on related table

    Massimo Favaro

      Hello everyone.

      Let's say I have two tables:


      OrderList:

      Order_Id

      Order_Start_Date

      Order_End_Date

       

      OrderDetails:

      Order_Id

      Order_Item

      Order_Quantity

       

      These two tables are linked together by a One to Many (Order list 1 - * OrderDetails) relationship by Order_Id.

      What I'd like to do is to create a calculated field in OrderDetails, such that

      IF(Order_Start_Date < Order_End_Date, 'Right', 'Wrong') .

      It would be easy to do that in the OrderList table, but how could I do it in OrderDetails?
      I am coming from another BI Software and I was used to work this way.

      Is it possible with Qlik Sense or do I have to merge the two tables in the script editor and create a single table?

       

      In the data editor I can choose only the fields ot the table I am currently working on.

       

      Many thanks to everyone who may give me some hints about this!