Need help nesting two SUM(Select expressions....

expressions
(Eli) #1

Need help nesting two SUM(Select expressions. The each have different tables but similar structure. They work on their own but I cant seem to combine. My syntax is off Formula 1: =SUM(SELECT(FG Inventory[Calculated Balance], AND([Flavour]=[_THISROW].[Flavour],[Country]=[_THISROW].[Country],[Packaging]=[_THISROW].[Packaging]))) Formula 2: SUM(SELECT(WH2 Inv[Calculated Balance], AND([Flavour]=[_THISROW].[Flavour],[Country]=[_THISROW].[Country],[Packaging]=[_THISROW].[Packaging] Is it possible to combine them?

(Aleksi Alkio) #2

How about… SUM(SELECT(FG Inventory[Calculated Balance], AND([Flavour]=[_THISROW].[Flavour],[Country]=[_THISROW].[Country],[Packaging]=[_THISROW].[Packaging]))) + SUM(SELECT(WH2 Inv[Calculated Balance], AND([Flavour]=[_THISROW].[Flavour],[Country]=[_THISROW].[Country],[Packaging]=[_THISROW].[Packaging]