View the original community article here
Last Tested: Sep 17, 2019
Users may end up using Table Calculations when pivoting and this leads to a table like:
|| Col_1_Pivot | Col_1_Table_Calc | Col_2_Pivot | Col_2_Table_Calc ||
Users will then only want to show the table calculation column(s). This is possible, but we will have to use the pivot_index function within table calculations. See the documentation page here.
The pivot_index
function can be used in table calculations to get the value of a pivoted column based on its index.
Syntax
pivot_index(expression, pivot_index)
Example: pivot_index(${monthly_change}, 2)
The pivot_index
function evaluates expression
in the context of the pivot column at the position pivot_index
(1 for first pivot, 2 second pivot, etc.) The function returns null for unpivoted results.
This content is subject to limited support.