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.
Hi all,
I created my first dashboard in Power BI desktop and everything was working fine. After publishing the dashboard to power BI online one of my measures returns an error.
Measure: YTD2017 = CALCULATE(SUM(APEWeekly[GAP CZK]); DATESBETWEEN(DateDimension[DateKey];"27.12.2016";LASTDATE(DateDimension[DateKey])))
The error message is: MdxScript(Model) (4, 99) Calculation error in measure 'APEWeekly'[YTD2017]: Cannot convert value '27.12.2016' of type Text to type Date.
I understand that there is a problem with the date format for 27th December 2016. But I have no idea why as there is no error and the measure works in the Power BI desktop.
For clarification, the measure calculates YTD sales and I can't use the YTD function as our year starts on 27th of December 2016.
Thank you for your help.
Daniel
Solved! Go to Solution.
I don't think it has anything to do with that specific date, but with the way you're entering it. Instead of "27.12.2016" try using the DATE() function.
Proud to be a Super User!
I don't think it has anything to do with that specific date, but with the way you're entering it. Instead of "27.12.2016" try using the DATE() function.
Proud to be a Super User!
Perfect, thank you very much! Now it works fine.
I hardly ever trust localized date order to work properly in Power BI or Excel. And I'm in the US. If it's at all possible to use a function to make the month and day explicit in a date, I always recommend using that option instead of letting the program try to parse a whole date.
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.
User | Count |
---|---|
110 | |
96 | |
77 | |
63 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |