atxchillin wrote:Thank you for the response - I get it now. It looks as though if we're happy with the format of dim1, dim2, Measure1, value then we get to use a view. If we want to change that format to Dim1, dim2, measure1 value, measure 2 value... then we are still stuck looping through dimensions.
Not necessarily, though you may have to do a little more work.
If you have a consolidation which adds measure 1, measure 2 etc together (or if you don't, you can create one) what you could do is this:
- Add N level subsets for Dim1 and Dim 2 to the source view.
- Add a subset consisting of the Measures consolidation alone to the source view.
- Do NOT set ViewExtractSkipCalcsSet to on, as you need the consolidation in the Measures dimension to be part of your source.
In your data tab, you can then use ElComp to loop through the components of the Measures consolidation.
In this way the main loop is still provided by the source view, the only loop you need to create is one to extract the individual measures values so that you can write them "in line" the way you've described. More to the point, you won't have to worry about iterating through stacks of zero values to generate your output.
The only thing you have to watch out for is the possibility that the various measures values don't add back to zero, thus preventing that row from appearing in your data source... though I doubt that would be a common problem.