BAQ Help required

how i can make sum of results generated from two different subqueries in external BAQ ?
i have two subqueries ,

subquery1 -Top level - 2 calculated feilds i.e 1.OpeningStock (sum(tranQty)) 2.PoReciepts(0)
subquery2 -Union all - 2 calculated feilds i.e.1.OpeningStock (0) 2.PoReciepts(sum(tranQty))
result shown as below

Porcpt qty
125 0
0 765

how i can sum of these rows ???

Thanks

Use a CTE put the Union queries in the CTE, then in your “Top Level” you can use SUM()

1 Like

Thanks jose… :wink: it worked…