Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

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 3
tamerj1
Super User
Super User

Hi @Anonymous 
What do you have FORMAT inside TOTALYTD? FORMAT returns text data type. Sure this will generate error

Anonymous
Not 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

@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.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.