Chris Adragna
Chris Adragna

Reputation: 632

DAX Expression for Annualized Revenue (YTD Revenue divided by days times 365)

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

Answers (1)

Marco Vos
Marco Vos

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

Related Questions