Forum Discussion
Anonymous
5 years agoNot applicable
How to get YTD Target ?
Hi All
I have YTD sales expression working fine :-
Sales YTD =
var _max = today()
return
calculate(TOTALYTD(('SALES'[SALES_]),'Date'[Date]),filter('Date','Date'[Date]<=_max))
I have Target amount field name = TARGET_AMT from TARGET Table.
Target YTD =
var _max = today()
return
calculate(TOTALYTD(('TARGET'[TARGET_AMT]),'Date'[Date]),filter('Date','Date'[Date]<=_max))
May i know where go wrong ?
Paul
Anonymous
Is Sales_ a meaure or a column?
based on the official document, the first parameter shoudl be expression not column.
TOTALYTD(<expression>,<dates>[,<filter>][,<year_end_date>])https://docs.microsoft.com/EN-US/dax/totalytd-function-dax
2 Replies
- ryan_mayuSuper User
Anonymous
Is Sales_ a meaure or a column?
based on the official document, the first parameter shoudl be expression not column.
TOTALYTD(<expression>,<dates>[,<filter>][,<year_end_date>])https://docs.microsoft.com/EN-US/dax/totalytd-function-dax
- AnonymousNot applicable
Hi Ryan
Thank you it work fine now
Paul