Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hey Guys, Newbie here.
I am trying to calculate YTD Sales using the following Formula:
Sales YTD = TOTALYTD([Sales], DimDate[CalendarDate].[Date])
Sales exists in a fact table and DimDate is a Date dimension . The two are related by datekey.
However when I try to plot the visual for YTD Sales, I get the following error:
MdxScript(Model) (6, 39) Calculation error in measure 'FactQBTransaction'[Sales YTD]: An invalid numeric representation of a date value was encountered
I checked the date table but everything seems fine
Can anyone help me with this?
Hi @Anonymous,
Could you please tell me if your problem has been solved?
Regards,
Daniel He
Hi @Anonymous,
Based on my test, it could work on my side, could you please offer me your data stucture or pbix if possible?
Also you can test with our sample report on your side.
https://www.dropbox.com/s/dc8ms0usflhrbch/Dim%20Date%20Error.pbix?dl=0
Regards,
Daniel He
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 33 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 90 | |
| 81 | |
| 66 | |
| 65 |