Skip to main content
Announcements
Happy New Year! Cheers to another year of collaboration, connections and success.
cancel
Showing results for 
Search instead for 
Did you mean: 
alec1982
Specialist II
Specialist II

wrong calculations in table chart

hi guys I am using the following script to create a table as below:

tmp:
LOAD
%LeaseKey,
max([Expense Amount]) as MaxExpense
RESIDENT Expense
GROUP BY %LeaseKey;
LEFT JOIN (tmp) LOAD
%LeaseKey,
[Expense Frequency]
RESIDENT Expense;

Result:
LOAD
%LeaseKey,
MaxExpense,
MaxExpense * 12 as [Annuallized Cost]
RESIDENT tmp;

DROP TABLES Expense, tmp;

the result looks like the below when loaded into a table box. and it is correct

%LeaseKey     Max(Expense Amount)     Annual Amount

1                    1000                                     12000

2                    625                                        7500

3                    400                                        4800

When I try to build the same table into a table chart I get wrong nrs(away higher than what's above.)

I am assuming that I should get the same nrs as the table above.

Any suggestions on what's wrong!

Thxs,

12 Replies
Anonymous
Not applicable

are this three colums independent of the columns present in your qvw . If there is a relation please provide me the other columns and small sample data.

alec1982
Specialist II
Specialist II
Author

While loading the table, I am adding another field that is effecting the calculations.

I have removed it and everything is working normally.

Thank you so much for your help.

Alec

Anonymous
Not applicable

no problem...