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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
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"))