Reputation: 632
In SSAS Tabular I already have a measure for YTD Revenue:
Revenue_YTD:=TOTALYTD([Revenue_CM], 'DIM_Time'[PK_Date])
Now I need another measure for Annualized Revenue.
It will take the YTD Revenue and divide by the number of days in the YTD measure and then multiply by 365 (in effect, "annualizing" the revenue measure).
I do have an attribute in DIM_Time called YearNumberOfDaysToDate. However, that's an attribute, not a measure.
I have looked at using the DAYSYTD function, but I understand that returns a table not a single value, and I can't quite grok how to pull this together.
Upvotes: 0
Views: 392
Reputation: 2968
You could use the COUNTROWS function on the table that is returned by the DATESYTD function. Something like this:
Annualized_Revenue:= [Revenue_YTD]/COUNTROWS(DATESYTD('DIM_Time'[PK_Date]))*365
Upvotes: 1