All data coming from a secondary data source MUST be aggregated (and produce a single value). Therefore all data coming from the primary data source must also be aggregated. So you'll have to SUM() or COUNT() or ATTR() all the fields being used in the calculation.
thanks for the response..
I can't do any aggregation because it's an dimension. in the primary table we have id column and secondary table has reference data..have used attr function but it doesn't work..