简体   繁体   中英

Preserve order of row field by another row field in Excel Pivot table

I'm trying to customize an excel pivot table.

So the situation is as follows:

  1. We have two row fields: one containing some measures and the other containing their order.

  2. In the pivot table, the order field is put before the measure field to preserve the correct order of the measure field.

  3. The problem is : -on removing the order field, the order of the measure field is removed. -on not keeping order filed and adding a calculated item to the measure field , it is duplicated for each measure since it doesn't have a value in the order field.

So basically I want to either:

  1. Preserve ordering of measure field while hiding order field before adding the calculated item at the end.

  2. Show both fields (order and measure) but on adding the calculated item, a default value to be added for the order field for this new item.

The source of data is from an external query.

Sorry, my bad, the last answer I gave did not work.

This does: in the pivot table field list panel at the right hand side. In the rows area, click on the order field drop down arrow, and choose field settings. Then in the layout and print tab click "Show item labels in outline form and uncheck the display labels from the next field in the same column.

Note that in the same tab you should check "Repeat item labels" this will cause the order to be repeated for every row. (Which I think is what you are asking about for the calculated field)

This will put the order field in it's own column. You can then hide the column to stop it displaying to the user. Note that it is possible to set the sort order for each column independently of the other, but clicking on each column then setting the sort order as usual.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM