The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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?
Hi @Anonymous
What do you have FORMAT inside TOTALYTD? FORMAT returns text data type. Sure this will generate error
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.