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
akkitek few questions.
- did you mark the calendar table as a date table?
- can you share the screenshot of the error?
- how you are trying to visualize the data?
Hey parry2k ,
Yes, my calendar table is a date field.
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!