R
Ranjit kurian
I have a table like the below formate
Month Amt
JAN 10
FEB 20
JUL 30
Through crosstab query i changed the formate of above table like below
AMT JAN FEB JUL
10 10
20 20
30 30
Now i would like to write a if function to the same crosstab query, if
funtion is something like this if 'JAN is <>0 then AGE(new column) is jan'
And 'if FEB is <>0 then Age is feb' And 'if JUL is <>0 then AGE is Jul'.
The problem iam facing is the column heading are not constant, it keep
changes based on month, but the column count remains same, so is it possible
to identify the columns based on numbers, for example: column JAN always will
be the second column, next month if the second column name changes to Dec,
the above if function should work in the second column irrespective of column
name/heading changes, something like the one we use in excel R1C1 References.
Month Amt
JAN 10
FEB 20
JUL 30
Through crosstab query i changed the formate of above table like below
AMT JAN FEB JUL
10 10
20 20
30 30
Now i would like to write a if function to the same crosstab query, if
funtion is something like this if 'JAN is <>0 then AGE(new column) is jan'
And 'if FEB is <>0 then Age is feb' And 'if JUL is <>0 then AGE is Jul'.
The problem iam facing is the column heading are not constant, it keep
changes based on month, but the column count remains same, so is it possible
to identify the columns based on numbers, for example: column JAN always will
be the second column, next month if the second column name changes to Dec,
the above if function should work in the second column irrespective of column
name/heading changes, something like the one we use in excel R1C1 References.