Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to compare two fields from two different tables

Hi,

plz resolve the issue.

A:

LOAD "Amount" AS Customer_Amount,

     "Company Name",

    "Document Type",

   "Posting Date";

SQL SELECT "Amount",

    "Company Name",

    "Document Type",

    "Posting Date",

   FROM TestSqlDatabaseOne.dbo."Detailed Customer";

B:

Purchase:

Concatenate(Customer)

LOAD "Amount" as Purchase_Amount,

    "Company Name",

    "Linked Sales Invoice",

    "Posting Date",

SQL SELECT "Amount LCY",

    "Company Name",

    "Linked Sales Invoice",

    "Posting Date",

    "Shortcut Dimension 2 Code"

FROM TestSqlDatabaseOne.dbo."Purchase" Where [Linked Sales Invoice] <> ' ';

C:

LOAD "Company Name",

     Currency Code",

     "Relational Exch_ Rate Amount",

    "Starting Date";

SQL SELECT "Company Name",

    "Currency Code",

    "Relational Exch_ Rate Amount",

    "Starting Date"

FROM TestSqlDatabaseOne.dbo."Currency" where "Currency Code"='INR';

Condition :

1. if(Posting date=Starting date and Document type=2) then Sum(Amount)/Sum(Relational Exch_Rate Amount) in A table is sales

2. If(Posting date=Starting date and Linked Sales Invoice=Document no) then Sum(Amount)/Sum(Relational Exch_Rate Amount)  in B table is purchase

Relation: A.Document no=B.Linked Sales Invoice

A.Posting Date=B.Posting Date=C.Starting Date

2 Replies
Gysbert_Wassenaar

Please don't clutter this site with duplicate discussions:Comparing two fields from two different table ?


talk is cheap, supply exceeds demand
Not applicable
Author

While I am posting the issue my system was hanged, mean while my colleague updated the issue.

after my post also updated, Sry for this. and I want solution for the issue asap.

Thanks