https://www.pbiusergroup.com/communities/community-home/digestviewer/viewthread?GroupId=547&MessageKey=83bbe78e-08c6-48fe-8480-b64252b5f8dc&CommunityKey=b35c8468-2fd8-4e1a-8429-322c39fe7110&tab=digestviewer&ReturnUrl=%2Fcommunities%2Fcommunity-home%2Fdigestviewer%3FCommunityKey%3Db35c8468-2fd8-4e1a-8429-322c39fe7110
DATESYSTD will return a column with the dates up to now. (You can use datesystd to manipulate the date).
TOTALYTD is an aggregate function that will return a scalar (single) value. For instance, used with a SUM, you will get the SUM of value from beginning of the year up to now.