Find Date Ranges on Members and SUM

Hello There,

I've got two measure groups with a dimension (Dimension A) that is related to one measure group but not the other. I want to find the date ranges of the members of an attribute in Dimension A in Measure Group 1 and apply that to Measure Group 2 in a calculation. This way I can find the sum of a measure from Measure Group A that falls within the time periods of the attributes in Measure Group B. How could I do this? 

Part of my MDX for this new calculated member starts like this, but doesn't work. I'm not sure if I'm on the right track or not.

WITH MEMBER [Measures].[New Measure] AS 
IIF( ISEMPTY ([Measures].[Measure 1]), NULL,
   SUM(([Date].[Hour].[Hour], [Dimension A].[Attribute].[Attribute]), [Measures].[Measure 2]))


  • Edited by Chip Levis Friday, July 24, 2015 7:21 PM
July 24th, 2015 7:20pm

Hi Chip,

According to your description, you have two measure groups, but only one can be sliced by Dimension A. Now you have a set of members in Dimension A slicing Measure Group1. Now you need to apply this set of members on Measure Group2. Right?

In this scenario,  since Measure Group2 is not related to Dimension A, even we can filter those set of members, we are unable to use this set to slice the Measure Group2. So you have to built the relationship between Measure Group2 and Dimension, then we can use FILTER() or IIF() to apply the set of members on Measure Group2.

Re

Free Windows Admin Tool Kit Click here and download it now
July 26th, 2015 10:30pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics