Jump to content

Using column header name in calculated column expression


Grant Morgan 3

Recommended Posts

I want to use the names of columns in a customer expression in a new calculated column to generate a number associated with that calumn header name. As an example, I've got five columns, each column header is a department resource name such as manager, associate, director, VP and SVP. In a calculated column I want the expression to be something like:

if(column header name)="manager",120, if (column header name) = "VP", 20, if...... etc. etc. The numbers refers to number of heads with that role name.

 

Thanks much,

Grant

Link to comment
Share on other sites

As far as I understand you want to summarize your data. And for that you don't need a calculated column. Either use a crosstable on your original data or unpivot your data and summarize it in a crosstable.

I attached a dxp file for some sample data. I assume your original data looks like my 'Data Table'. 'Data Table (2)' is the unpivot version of it. The cross tables are below the original tables. Of course you can rename the clomuns.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...