Can I show only one table calculation column when using a pivot field?

Knowledge Drop

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 ||

f0c83980-9e92-4ea8-ba39-8dbf6ec01a34

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.                

Version history
Last update:
‎04-05-2021 09:06 AM
Updated by: