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: 
Not applicable

How to retreive data from table/qvd and do calculation in expression itself?

Hi

      I have 2 tables in these way;

                  table 1: revenue

                               Date,         Country, Revenue, Currency

                              24-4-2011,    India,    1000,         INR

                  table 2: USDconversion rate

                                 Currency, USDrate

                                      INR,   53.21

Now i want to write the expression for table which add Revenue_in_USD as row in same table. Expression should take USDRate from USDconversion table and revenue from revenue table and then convert into USD.

3 Replies
Not applicable
Author

hi,

Instead of table take chart control. Add calculated dimension. Keep Chart Type as Table. This will serve your req..

Swapnil

Not applicable
Author

Hi

          I dont need any calculated dimension . Output table should be:

              Date,       Country, revenue, revenue_in_USD

            24-04-2011 ,India,      1000,       18.79  

jagan
Partner - Champion III
Partner - Champion III

Hi,

Calculate revenue_in_USD in script, then it would be easier to use as dimension.  Try below script

TempTable:

LOAD

     *

FROM Revenue;

LEFT JOIN (TempTable)

LOAD

     *

FROM USDconversion;

Revenue:

LOAD

Date,

Country,

Revenue,

Currency,

USDrate,

Revenue/USDrate

RESIDENT TempTable;

DROP TABLE TempTable;

Hope this helps you.

Regards,

jagan.