I want to create a formula for a measure that will apply different formulas depending on the FormulaId column in the fact table. But for some reason the line “Table'[FormulaId]” in “var Formula = ‘Table'[FormulaId]” is highlighted in red with a syntax error. This column definitely exists, there is no mistake in the name.
Measure:=
var Formula = 'Table'[FormulaId]
return
SWITCH
(Formula,
1,
IF
(
not (iserror(SUM('Table'[Value_1])/SUM('Table'[Value_2]))),
SUM('Table'[Value_1])/SUM('Table'[Value_2]),
BLANK()
),
2,
SUM('Table'[Value_1]),
BLANK()
)