Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VisualTotals function: can you return only the total?

Status
Not open for further replies.

NBartomeli

Programmer
Jul 1, 2003
111
US
I know how the visual totals works, but is there a way to have it only return you the aggregate column and not the child columns with it?

If not, is there an easy way to accomplish this?

Example: (taken from SQL Server Books Online)
Code:
select 
{[Measures].[Unit Sales]} on columns, 
{VisualTotals({[Product].[All Products].[Food].[Baked Goods].[Bread],
  [Product].[All Products].[Food].[Baked Goods].[Bread].[Bagels],
  [Product].[All Products].[Food].[Baked Goods].[Bread].[Muffins]},
   "**Subtotal - *")
} on rows
from Sales


RETURNS (something like):


                   Unit Sales
*Subtotal - Bread  4,312.00
Bagels             815.00
Muffins            3,497.00

but I only want the 4312 value
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top