Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi All
My expression get error :-
_YTD_REV_ =
var _max = today()
return
calculate(TOTALYTD((GL[1_REV] = "REV"),'Date'[Date]),filter('Date','Date'[Date]<=_max))
Above link is my PBI file
Paul
Solved! Go to Solution.
Hi, @admin11
According to your DAX formula, I think that the true reason for this error is that you should use a measure or an expression as the first parameter of the TOTALYTD() function, you can try to use this measure:
_YTD_REV_ =
var _max = today()
return
calculate(TOTALYTD([AMOUNT],'Date'[Date]),GL[1_REV] = "REV",filter('Date','Date'[Date]<=_max))
Then you can get the same value as the first measure you created, like this:
You can download my test pbix file here
More info about TOTALYTD() function
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @admin11
According to your DAX formula, I think that the true reason for this error is that you should use a measure or an expression as the first parameter of the TOTALYTD() function, you can try to use this measure:
_YTD_REV_ =
var _max = today()
return
calculate(TOTALYTD([AMOUNT],'Date'[Date]),GL[1_REV] = "REV",filter('Date','Date'[Date]<=_max))
Then you can get the same value as the first measure you created, like this:
You can download my test pbix file here
More info about TOTALYTD() function
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@admin11 Do you have a measure you're trying to calculate as YTD?
There's no problem using the DATESYTD as you have, but you need only a MEASURE as the first input parameter/argument in TOTALYTD and you are using a boolean expression.
Try:
_YTD_REV_ =
TOTALYTD([Amount],'Date'[Date]),GL[1_REV] = "REV")
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Hi Allison
Thank you for sharing.
I get error msg , i try to use 'G:[] also cannot.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!