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
I get above error msg when i try :-
Solved! Go to Solution.
Hello @admin11 ,
Please try the following formula:
Sales YTD TDS =
var _max = date(year(today())-0,month(today()),day(today()))
return
Calculate(TOTALYTD(('SALES'[SALES_]),dateadd('Date'[Date],-0,year),'Date'[Date]<=_max),filter(SALES,[SOURCE] = "TS"))
Hi Paul,
Your measures can be simplified, e.g. for Sales YTD
Sales YTD = TOTALYTD(('SALES'[SALES_]),'Date'[Date],'Date'[Date]<=TODAY())
and for this particular question, Sales YTD TS
Sales YTD TS = CALCULATE(TOTALYTD(('SALES'[SALES_]),'Date'[Date],'Date'[Date]<=TODAY()), FILTER('SALES', 'SALES'[SOURCE] = "TS"))
Regards
Phil
Proud to be a Super User!
Hi Paul,
Your measures can be simplified, e.g. for Sales YTD
Sales YTD = TOTALYTD(('SALES'[SALES_]),'Date'[Date],'Date'[Date]<=TODAY())
and for this particular question, Sales YTD TS
Sales YTD TS = CALCULATE(TOTALYTD(('SALES'[SALES_]),'Date'[Date],'Date'[Date]<=TODAY()), FILTER('SALES', 'SALES'[SOURCE] = "TS"))
Regards
Phil
Proud to be a Super User!
Thank you for sharing the shorter expression.
For me since i no good in writng script , so i prefer YTD & LYTD as below :-
Hello @admin11 ,
Please try the following formula:
Sales YTD TDS =
var _max = date(year(today())-0,month(today()),day(today()))
return
Calculate(TOTALYTD(('SALES'[SALES_]),dateadd('Date'[Date],-0,year),'Date'[Date]<=_max),filter(SALES,[SOURCE] = "TS"))
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!