0
votes

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

1
Do you have Date table in your model? Share a sample of your data.alejandro zuleta

1 Answers

1
votes

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.