Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a straight table attached, It shows top 5 stores by POS Sales desc ranking at default.
Be advised, the attached excel file is just way I want to show in straight table not the data I want to directly use.
Here is what I want, when end user clicks different column header, the table need show top 5 stores by the clicked header accordingly. For instance, if POS Qty is clicked, the table shows stores ranked by POS QTY desc. NOT by POS Sales any more. therefore, it could be totally different store list there.
the confusing part is to show each column data, I have entered expression for each of them, How could I write additional expression and where I put? thanks.
See attached example.
Thanks, Gysbert, I am using personal edition, could not open your file. Do you mind telling me the way you do? thanks.
Option 1:
Option 2:
Create seven variables
Create a straight table with store# as dimension and five expressions:
On the Dimension Limits tab enable the option Restrict which values are displayed using the first expression. Enable the Show Only option en select Largest and 5 as settings for this option. Disable the option Show Others. The dimension limits are calculated based in the first expression. For this reason the first expression must be the HiddenSortColumn expression $(eSortExpression). This expression picks an expression based on the value of the vColumn variable.
On the sort tab move the store# column to the top of the priority list and enable Sort by Expression option for the store# column. Enter as expression: $(eSortExpression)*$(vSortOrder)
On the Presentation tab select the HiddenSortColumn column and enable the option Hide Column.
Create a new text box. On the Layout tab of the properties window set the Layer setting to Top. Resize and position the text box so it fits exactly over the header cell of the POS Sales column. Use the following expression for the Text value of the text box: ='POS Sales ' & if($(vColumn)=1, if($(vSortOrder)=-1, '▼' , '▲')).
Add a Set Variable action to the text box on the Actions tab. Use vColumn as Variable and 1 as Value.
Add another Set Variable action to the text box. Enter vSortOrder as Variable and use as Value this expression: =if($(vColumn)=1,-1,1)*$(vSortOrder)
Create three more text boxes for the other three expression header cells by copying the one just created. Change the Set Variable actions of these text boxes so the correct column numbers are used.