Forum Discussion
YTD not working
Hi all,
I have a question that is stumping me and I cannot figure it out. I suspect it is something simple but here we go anyway.
I have a table which has a date column, there are dates in the future in this table. I also have a calendar table and the relationships are setup.
In a measure I am using Calculate with Datesytd.
Expected_YTD = CALCULATE(sum(MadeUpTableName[Col1]), DATESYTD('Calendar'[Date]))
There is a slicer on the visual page allowing the user to select the year. There is no month slicer.
However, this measure always shows the full year sums, rather than just up to today. I suspect this is there is nothing telling it to use today as the 'end' date.
Any ideas?
hey,
thats right you need to make it change to check until today, try something like this:
Measure = CALCULATE(SUM(Table1[value]),YEAR(Table1[date]) = YEAR(TODAY()), MONTH(Table1[date]) <= MONTH(TODAY()) )
2 Replies
- StefanoGrimaldiResident Rockstar
hey,
thats right you need to make it change to check until today, try something like this:
Measure = CALCULATE(SUM(Table1[value]),YEAR(Table1[date]) = YEAR(TODAY()), MONTH(Table1[date]) <= MONTH(TODAY()) )
- AnonymousNot applicable
You are a super star, thank you so much 🙂
I wasted so much of my afternoon scratching my head at this lol... oh well, its all a learning experiance I guess 😄