質問

I have a table column reference in my worksheet which is connected to a query table which is a result of a MDX query.

This query can return various numbers of columns however, some column names are still the same.

My problem is, that if I am referencing a column with some name- example: DashboardTable[[#Headers],['[Measures'].'[AFR'] and then refresh my MDX query, which returns different numbers of columns then my formula in excel changes referencing different column than it previously had. (The AFR column still exists in the query results, but may appear at different position)

Is there a way to have an "absolut" reference to table column with name AFR in this case regardless of it's position in the MDX query? I can be sure that the column with this name will exist, the position though may differ.

Thank you very much for any help

役に立ちましたか?

解決

ok, so I decided to solve it with a match function, where I match column name in the header row. previously I had : =offset(tableName.tableColumn,x,0) and I changed it to

=offset(A1, x, match("columnname", 1:1 (header row), 0)). I find it a little bit dirtier but is the only solution I was able to find.

他のヒント

I think indirect function may work better. For instance, you should use

INDIRECT("tablename.tablecolumn")
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top