Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a variable vExpN ($1) which calculates as an expression from row $1 in an island table. This works fine if I used a hard coded parameter e.g. vExpN(1) returns and calculates the expression =Count(ID), vExpN(2) returns and calculates the expression =Count(Category) etc.
In this island table there are 12 expressions, and there 12 items in my main table Dimension. Each item in the Dimension is the description of an expression in the island table, e.g. the 1st dimension item is 'No. of Events, and this corresponds with the 1st expression, =Count(ID). The second item in the dimension is 'No. of Categories' and this corresponds with the 2nd expression, = Count(Category) etc.
I would like to pull in a specific expression for each item based on its RowNo(), meaning my 'Measure' column contains 12 different expressions.
I have tried the following:
=$(=$(vExpN(RowNo())))
This executes as =Count(ID) and calculates correctly. This is the first measure in my list, and is the correct output for the Dimension item with RowNo()=1, but in doesn't move on to the 2nd measure, and continues with Count(ID) for across all 12 Dimension items. I think this means it calculates RowNo() as 1 but does not get any further?
Is there a way of making this work?
If your Island table is as below, Just add a numerical reference field in the island table itself
Dummy:
Load *,rowno() as Dim inline [
Description
No. of Events
No. of Categories
];
Modify your variable vExpN, so that it follows the load order of Description matches the retrieved formula so No. of Events is at 1st position , No. of Categories is at 2 position
Then instead of Rowno() use Dim
=$(=$(vExpN(Dim)))