Skip to main content
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
Luminary Alumni
Luminary Alumni

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.