As a follow up the previous post about Dynamic Columns, a user asked me if there was a way to display the parameter selected as the header.
There are a couple of methods of making a column header dynamic;
Date Range Formula for Line Graphs
In a previous article, I demonstrate how you can put a dynamic header for a line graph here.
Using a "Hidden" Grand Total Row
Andy Kriebel demonstrates how you can use Annotations in a Grand Total Row at the top of a stacked bar chart here. I tested this out and you can put the Parameter text (as shown in a Tooltip with the <> tags) in an Annotation.
Using Another Sheet as Your Header
I created a new worksheet in my workbook from the previous blog.
I placed the Column 1 and the Column 2 calculated fields onto the Rows Shelf.
I then replaced the Column 1 pill with Parameter 1 by dragging it over the pill on the Rows Shelf.
![](https://static.wixstatic.com/media/fb3a64_75f84626255646a98cd1fa64303beddb~mv2.png/v1/fill/w_518,h_211,al_c,q_85,enc_auto/fb3a64_75f84626255646a98cd1fa64303beddb~mv2.png)
I then repeated these steps for the Column 2 calculated field.
Then I put the following calculated fields on the Rows Shelf;
Profit Header
TRIM(" Profit ")
Sales Header
TRIM(" Sales ")
![](https://static.wixstatic.com/media/fb3a64_db3cc3c4c4f34c7f958969ffd531f2f6~mv2.png/v1/fill/w_777,h_120,al_c,q_85,enc_auto/fb3a64_db3cc3c4c4f34c7f958969ffd531f2f6~mv2.png)
In my dashboard, I hid the Title of the first worksheet displaying the dynamic columns.
I placed the newly created worksheet above the other worksheet.
I hid the title on this new worksheet.
I then formatted the text to be bold etc.
I also removed grid lines etc.
I moved the headers around by adjusting the column widths.
I moved the header line all the way over to hide the abc.
![](https://static.wixstatic.com/media/fb3a64_b3c4e3996ca04997846deb8827dcc0b5~mv2.png/v1/fill/w_980,h_136,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/fb3a64_b3c4e3996ca04997846deb8827dcc0b5~mv2.png)
You can see the finalized result here.
Comments