Follow-up: DAX Syntax in a measure

Me again … Thanks again for the help.

I used the code in DAX Query View and it ran without issue. When I tried the same code in a measure, I get “an unexpected exception occurred” error.

Auto Datetime = 
VAR _BaseTable = 
    ADDCOLUMNS (
		SELECTCOLUMNS(
			INFO.ANNOTATIONS(),
			"ID", [ID],
			"Name", [Name],
			"Value", [Value]
		),
	"Junk", 999
	)
VAR _FilteredTable =
	FILTER(
		_BaseTable,
		[Name] = "__PBI_TimeIntelligenceEnabled"
	)
VAR _Result = SELECTCOLUMNS(
    _FilteredTable,
    "Value", [Value]
)

RETURN
_Result

Any thoughts on what I’m doing wrong?

Thanks,
Greg

The issue is likely that INFO.ANNOTATIONS can’t be used in measures, columns, or calculated tables. I initially thought you could materialize the results as a static table directly within query view, but it isnt obvious how to do that.

A less practical but possible workaround is to run the query in DAX Studio, export the results as a static file, and then import that file back into Power BI.

OK, thanks. Yeah, I’d run across the same note that it wouldn’t work in calculated tables, but since it worked in DAX Query View, I thought it might still work in a measure. I’ll keep your workaround in mind. Thanks again for your help.
Greg