Report Portal

MDX-Query to show totals of a set with just some members

Q: I have a set that represents a day interval. How do I show the total amount value for such set?

A: You can use the VisualTotals function:

SELECT VisualTotals({ [Date].[Calendar].[Month].&[2004]&[7]
, [Date].[Calendar].[Date].[July 7, 2004] : [Date].[Calendar].[Date].[July 8, 2004]
}, '* Visual total') ON 0
FROM [Sales Summary]
WHERE ([Measures].[Sales Amount]);

Results:

July 2004 Visual total July 7, 2004 July 8, 2004
$3,844.38 $1,318.51 $2,525.87

Tags: mdx, faq

 

2007-2015 VidasSoft Systems Inc.