Hi All,
I am stuck at a strange requirement, and really need your help here...
The business has a need to include/exclude fact members in a DISTINCT COUNT Measure conditionally.
Below are some details of our cube :
Dim 1 : DimTime
Dim 2 : DimRegion
Dim 3 : DimInvestment
Dim 4 : DimInvestor
Fact Tables :
FactTable1 : (FactID, RegionID, InvestmentID, InvestorID, InvestmentValue)
Measures :
M1 = SUM(InvestmentValue)
M2 = DISTINCTCOUNT(InvestorID)
Recently, the business has realised that 2 of their investments (say Inv1 & Inv2) areDuplicated.
This means, the cube holds them as different investments, but in reality, they are the same.
And now, they have asked us to conditionally remove one of the investments (Inv2) from the Cube outputs.
**THEY CANNOT REMOVE ONE INVESTMENT AT SOURCE -- AND NEED BOTH ON CUBE ** :(
Conditions :
When queried for dimInvestment, the output should include values from both Inv1 & Inv2 separately.
But when queried for dimRegion (which can have many investments), the output should include only Inv1 (exclude Inv2).
What we did :
To work-around the additive measures (like InvestmentValue), we introduced a Dummy Investment (dummy Inv2) with exact Negative value of original (Inv2) in the Fact Table, which makes its NET TOTAL = 0 when queried for DimRegion, and retains value when queried
for DimInvestment.
This is working correctly.
PROBLEM : The problem is around Measure2 --> DISTINCT COUNT(InvestorID)
it is still including the InvestorID of Inv2 when we query against dimREGION.
I have tried many ways like FILTER, SCOPE, changing the aggregation type of Measure2 etc. but nothing works.
Can anyone please suggest any way of fixing this.. either on the cube or on the FactTable ??
Sample Data:
![]()
Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.