f0rd42
f0rd42

Reputation: 1459

DATESYTD returns no value

I have a "sales" table containing all sales data and created a measure:

Total Sales = SUM(std_adi[Nettopreis])

this works fine in power pivot. Now I want a DATESYTD() measure and used:

Total Sales YTD = CALCULATE([Total Sales], DATESYTD(Dates[Date]))

but when I add this into the power pivot sheet, it contains "no value"

My "Dates" table has a column "Date" and has a relationship to the std_adi table, column order_date (which contains my sales data)

Am I missing something? I have the above DATESYTD formula from a book and looks identical to all the examples on the net

Even if I change the measure to:

=CALCULATE(SUM(std_adi[Nettopreis]), DATESYTD(Dates[Date]))

it contains "no value" which leads me to the point that something with the Dates Table might be wrong, but I can't find anything

Upvotes: 0

Views: 960

Answers (1)

Rory
Rory

Reputation: 969

It won't have a value unless you slice / filter your pivot by year.

If it still doesn't work check that your Dates table is marked as a Date table. Check that you have a date for every day in the timeframe you are looking at. And check that you can slice your Total Sales measure by Year from your Date table. Your formula is fine.

Upvotes: 2

Related Questions