Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.