0
votes

I was wondering why doing the following doesn't work in DAX (it would be much neater than a nested IF), or even if there is a way to get it to work.

=RELATED("MVD["&[scenario_id]&"]")

Description of the data: 2 tables, the table that related is pulling the column reference based on a value filled in the other row. Running the above formula gives you the following error: Function RELATED expects a fully qualified column reference as its argument.

1

1 Answers

0
votes

No, it won't work.

As noted by the error, RELATED() requires a column reference as its argument. What you're passing to the function is a string e.g. "MVD[1]", but still not a column reference, MVD[1].

So I'm afraid IF()/SWITCH() is already the best you can do.