- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
Is it possible to select variables or columns to include in an object like list table or crosstab? For example, I have a data set like this.
Attribute Name Station Size Region Value Size_0_15 Size_16_40
Salaries A 0_15 Region A 150000 167580 850789
Salaries B 16_40 Region B 760785 167580 850789
When I filter the report with Station = A, I want the column Size_0_15 is displayed next to the Value, like:
Attribute Name Station A Size_0_15
Salaries 150000 167580
But when I filter it with Station = B, I want the column Size_16_40 instead, like:
Attribute Name Station B Size_16_40
Salaries 760785 850789
Thanks in advance,
Cokey
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You can do this by using a calculated data item and a parameter.
I assume that you have a button bar or other filter control object that selects between Station A and Station B?
If you create a parameter and assign it to the control, then you can use the parameter value in your calculated item. The expression might look like this:
IF ( 'Parameter 1'p = 'Station A' ) RETURN 'Size_0_15'n ELSE IF ( 'Parameter 1'p = 'Station B' ) RETURN 'Size_16_40'n ELSE ''
Now you can assign this calculated item to your objects.
Let us know if that helps,
Sam
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sam,
Thanks for the tips. This solved half of my problem.
The content of the different columns can be displayed using this formula, but the column header is not dynamic still. right?
Cokey
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If the label of the selected column is important to your viewers, you could add a text object to provide an explanation:
"For Station A, sizes 0-15 are displayed. For Station B, sizes 16-40 are displayed."
Would that make sense?