Forum Discussion
TotalYTD function returning error
- Anonymous4 years ago
Hi akkitek ,
You can try to change the formula to the following form:
ODC Expense YTD = CALCULATE(SUM('FACT_Fin_Data_by_Mo'[ODC Expense]), FILTER(ALL('Calendar'),'Calendar'[Date]<=TODAY()&&'Calendar'[Date]>=DATE(YEAR(TODAY()),1,1)))Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi akkitek ,
1. Are you using DQ mode, special treatment of date columns (drill down by using year, quarter, month, or day) isn't supported in DirectQuery mode.
2. Does your date table have invalid date and time values exceeding 9999 years?
https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-data-types#datetime-types
This is the related document, you can view this content:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hey Anonymous ,
Thanks for your reply.
1) I don't think I'm using DQ mode as this is a Web datasource and doesn not support DQ
2) My date table doesn not exceed 9999 years. the latest date in my table is 4/1/2101.
I am trying to have a Table visual (image below) with ODC Expense and Resource direct cost by Project code. I can set a filter to this visual by using the month column in the filter pane and manually selecting the months until this month but I want to make it dynamic and just create a measure which returns just the YTD values for ODC expense and RDC. The card visual has the YTD ODC expense field and is broken and returns the following error. When I drop the YTD ODC Expense measure in the table visual it breaks too
Looking forward to hearing from you. Thanks!