Forum Discussion
The True/False expression does not specify a column. error to calculate YTD
I want to calculate YTD based on 4-4-5 weeks, my fiscal year is for example, 2019/2022, 2020/2021, and 2021/2022, and the Month is from April to March. However, due to the 4-4-5 weeks, sometime the fiscal end month might be in first week in April and fiscal start month might be the 2nd week of April.
Note it is not a typical 1st of April to 31st March.
I wrote a dax
YTD =
var CurYr = max(DateLookup[Fiscal Year])
var latestDate =
calculate( max(DateLookup[Date]) , DateLookup[Fiscal Year]=CurYr)
return
TOTALYTD(sum(HS_LeadingIndicators[Target_In_Period]), DateLookup[Date],Format(latestDate, "mm/dd"))I'm getting error message
The True/False expression does not specify a column. Each True/False expressions used as a table filter expression must refer to exactly one column.How can I fix this error message?
3 Replies
- tamerj1Community Champion
Hi Anonymous
What do you have FORMAT inside TOTALYTD? FORMAT returns text data type. Sure this will generate error- AnonymousNot applicable
I want to use the Format to return the mm/dd and it will supply it to the TOTALYTD function.
Is there another way- tamerj1Community Champion
Anonymous
I don't see the reason behind that. Just take out FORMAT from picture and the error should go away. Then if the results do not match the requirement then please let me know what should be the expected result.