JonathanHolliday
Technical User
Hi,
I have the need to sum a value in a query with a join.
For example:
I have
Stock table including Cost of Item
Sales table including Item and Sales Vales
I want to show: Item, Sum(Sales Value), Sum(Cost)
When I define Cost and Sales Value as measures without sum() in the Universe all is fine:
[SELECT
Sales.Item,
Sales.SalesValue,
Sock.Cost
FROM
Sales,
Stock
WHERE
(Stock.Item=Sales.Item)]
When I change one of the measures to include sum(), still OK:
[SELECT
Sales.Item,
sum(Sales.SalesValue),
Stock.Cost
FROM
Sales,
Stock
WHERE
( Stock.Item=Sales.Item )
GROUP BY
Sales.Item,
Stock.Cost]
As soon as I put the Sum() on the last measure in the Universe to reduce the fetched data the query splits into two queries.
I know this is very basic stuff but what do I do in the Universe to make this aggregation work? I've got about fifty other examples that I need to get aggregating (some of my reports are > 150MB for a single page report!)
Thanks,
Jonathan (not-so-TechnicalUser)
I have the need to sum a value in a query with a join.
For example:
I have
Stock table including Cost of Item
Sales table including Item and Sales Vales
I want to show: Item, Sum(Sales Value), Sum(Cost)
When I define Cost and Sales Value as measures without sum() in the Universe all is fine:
[SELECT
Sales.Item,
Sales.SalesValue,
Sock.Cost
FROM
Sales,
Stock
WHERE
(Stock.Item=Sales.Item)]
When I change one of the measures to include sum(), still OK:
[SELECT
Sales.Item,
sum(Sales.SalesValue),
Stock.Cost
FROM
Sales,
Stock
WHERE
( Stock.Item=Sales.Item )
GROUP BY
Sales.Item,
Stock.Cost]
As soon as I put the Sum() on the last measure in the Universe to reduce the fetched data the query splits into two queries.
I know this is very basic stuff but what do I do in the Universe to make this aggregation work? I've got about fifty other examples that I need to get aggregating (some of my reports are > 150MB for a single page report!)
Thanks,
Jonathan (not-so-TechnicalUser)