I have a problem which seems to be very simple to solve but I can't. In my Fact table I have a Timestamp field which is a smalldatetime Type. This fact is linked to a Time dimension via its fulldate_Fk (also SmallDatetime). So What I would like to have is to compare the timestamp with the FullDate_FK from the fact to create a calculation like this:
iif([Dim Time].[Date].CurrentMember.MemberValue <=
[Fact].[Timestamp].CurrentMember.MemberValue
,[measures].[YTD Actuals]
,[measures].[YTD Actuals]+[measures].[YTD Com])
But it is not working at all. All [Dim Time].[Date] seem to be evaluated as < than the Timestamp. P.S: The Timestamp is the last date when the data have been loaded in the DB (in my case 31/08)
Here the result I got:
MONTH | YTD Actuals | YTD Com | Calculation;
JAN , 10 , 10 , 10;
FEB , 20 , 10 , 20;
MAR , 40 , 20 , 40;
MAY , 60 , 30 , 60;
JUN , 70 , 50 , 70;
JUL , 85 , 50 , 85;
AUG , 120 , 55 , 120;
SEP , 120 , 60 , 120;
OCT , 120 , 70 , 120;
NOV , 120 , 80 , 120;
DEC , 120 , 90 , 120;
From August, I should have the sum of Actuals YTD and Com YTD in the calculation, but I still have the Actuals YTD only?
Extra Info I'm using PivotTable just by dragging attributes in Excel. Month in rows and measures (the 2 YTD and the new calculated member)
Dim Time
dimension have the month attribute? – SouravA