Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hey,
I'm struggling with a measure that I have made in Power BI desktop, calculating YTD sales.
The measure is as follows:
YTD 2008 = TOTALYTD([TotalSales];DimDate[FullDateAlternateKey];"31.12.2008")
And it works perfectly in power BI DESKTOP. However, when importing to BI service, it "Couldn't retrieve data for this visual". Different measures that I have calculated have no problem loading.
Does anyone know what the problem might be?
Solved! Go to Solution.
Hi @oll,
If there are mutiple years data in your DimDate table. The TOTALYTD will calculate the different years' year-to-day sum.
The default year-end-date is December 31. For exemple, I have date from 2013/1/1-2015/12/31, it return the sum of 2013,2014,2015 saperately. You are not supposed to add year in year-end-date parameter, you just need to add the month/day wanted to end.
Measure1 = TOTALYTD(SUM(Sales[SALE]),DimDate[Date])
It works fine when I publish it to service.
Best Regards,
Angelia
Hi @oll,
If there are mutiple years data in your DimDate table. The TOTALYTD will calculate the different years' year-to-day sum.
The default year-end-date is December 31. For exemple, I have date from 2013/1/1-2015/12/31, it return the sum of 2013,2014,2015 saperately. You are not supposed to add year in year-end-date parameter, you just need to add the month/day wanted to end.
Measure1 = TOTALYTD(SUM(Sales[SALE]),DimDate[Date])
It works fine when I publish it to service.
Best Regards,
Angelia
Try replacing that last argument with a DATE() formula.
Proud to be a Super User!