Forum Discussion
akkitek
4 years agoHelper III
TotalYTD function returning error
Hey All, I have a column with values and a column with dates (image below). I'm trying to create a simple measure calculating the YTD sum of the values. I tried the following measure: ODC Expense...
- 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
parry2k
4 years agoSuper User
akkitek it is a pretty simple thing and seems like we are making it complicated. It will be easier if you share pbix file, remove sensitive information before sharing. It is very hard to provide a solution without looking at the details.
akkitek
4 years agoHelper III
Hey parry2k ,
Sure thing! Here's the link to the file:
https://drive.google.com/file/d/1hYDaBCJQNGfp1XGeNzAxeVAbGiNlaBMX/view?usp=sharing
When i use the following measure, I get 0:
ODC Expense YTD = TOTALYTD(SUM(FACT_Fin_Data_by_Mo[ODC Expense]),'Calendar'[Date])
and When i use this measure, I get the error:
ODC Expense YTD = TOTALYTD(SUM(FACT_Fin_Data_by_Mo[ODC Expense]),FACT_Fin_Data_by_Mo[Month])