Reporting Services Aggregate not working for parent-child relationships

Question!

I have a parent-child attribute relationship in an Analysis services dimension, say [Dim].[Child] is a child of [Dim].[Parent] and I have a query, that returns the set

UNION( [Dim].[Parent].Members * [Dim].[Child].Members, [Dim].[Parent].[ALL] * [Dim].[Child].Members )

on axis 1 and some output on axis 0. The query works fine when run in management studio.

Now I'm trying to make a chart in Reporting Services with [Dim].[Child] on the x axis and Aggregate(some_output) on the Y axis. I expect to see child members on the x axis with the output aggregated for all parents (which is just one in this case), i.e. the data taken from the line { [Dim].[Parent].[ALL], [Dim].[Child].&[TheChildID] } . As stated above, the query does indeed return this line with the correct data.

However, the Aggregate function in this case returns NULL. This behaviour is always present when using parent-child attributes and putting the child on the X axis. The same also happends when putting the child in a tablix row and adding an aggregated output in a column. It seems like the Reporting Server is aware that the aggregation will be happening for only one member and refuses to do it.

If I make another identical query, just put in attributes which have a different relationship, e.g. [Time].[Month] and [Time].[DayOfMonth], aggregation works fine, since this time the same day can belong to many months and data needs to be aggregated.

Now I have no idea why is this happening - does the Reporting Server acctually query the OLAP data source to figure out the relationship or what ? Or is there some magic in the query that returns the ALL rows, which I'm not aware of ? The only correlation for cases which work and which don't seems to be the relationship.

EDIT: some observations after playing around more: the report works if I remove the line [Parent].Members * [Child].Members from the query, forcing it to retrieve only [Parent].ALL * [Child].&[ID] rows. The chart now has data aggregated, but obviously, I don't have individual members anymore.



Answers

Just a couple of observations that I hope will help.

  1. The aggregate function in reporting services requires a "scope" parameter...for example Aggregate(Fields!Child.value, "ParentGroup")
  2. Your data provider must support this function. If it doesn't then "Nothing" is returned. See link below...

For more help/info check Aggregate function documentation.

By : Mozy


You may find the Monitored Undo Framework to be useful. http://muf.codeplex.com/

It doesn't use the "top down" command pattern, but instead monitors for changes as they happen and allows you to put a delegate on the undo stack that will reverse the change.

In your case, if you're binding to an underlying model / viewmodel, then you could hook up the framework to capture these changes and then undo / redo them as needed. If the model implementes INotifyPropertyChanged and uses ObservableCollections, it should automatically reflect actions performed on the model, including undo / redo actions.

You can find more info and documentation on the codeplex site at http://muf.codeplex.com/.

By : NathanAW


In my case , i deselect the cell right at the end of didSelectRowAtIndexPath :

  - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

    // Do smth here. segue ..etc

    [tableView deselectRowAtIndexPath:[tableView indexPathForSelectedRow] animated:NO];
}


This video can help you solving your question :)
By: admin