# Is it possible to hide pivot columns?

**URL:** <https://community.amazonquick.com/t/is-it-possible-to-hide-pivot-columns/5924>\
**Category:** Q&A\
**Tags:** filters, calculations, quick-sight\
**Created:** [September 9, 2022, 9:06am UTC](https://community.amazonquick.com/t/is-it-possible-to-hide-pivot-columns/5924 "2022-09-09T09:06:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![janosch](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@janosch](https://community.amazonquick.com/u/janosch)\
**Post date:** [September 9, 2022, 9:06am UTC](https://community.amazonquick.com/t/is-it-possible-to-hide-pivot-columns/5924/1 "2022-09-09T09:06:39Z")

</div>

I have a pivot table that shows #notifications and the relative and absolute change from the previous quarter. The relative and absolute changes are implemented as calculated field:

periodOverPeriodDifference(distinct\_count({reference}), {dateOfNotification})  
periodOverPeriodPercentDifference(distinct\_count({reference}), {dateOfNotification})

I would like to show only the current and previous quarter. This is how it looks like at the moment:

 ![Bildschirmfoto 2022-09-09 um 10.36.00](https://d1wl4jav5dp96l.cloudfront.net/original/2X/c/c7517744bc5fa9957bf4df6c2626772d75381182.png)

I would like to get rid of _Q1 2022_. The problem is if I change the filter on _dateOfNotification_ to include only two quarters, the difference calculations in Q2 2022 do not show any results. This is probably because Q1 is needed to calculate those values.

Is there a way to base calculations on Q1 but do not show it in the pivot table?

---

<div class="post-metadata">

**Author:** ![WLS-P](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/wls-p/32/36109_2.png) [@WLS-P](https://community.amazonquick.com/u/WLS-P)\
**Post date:** [September 9, 2022, 3:49pm UTC](https://community.amazonquick.com/t/is-it-possible-to-hide-pivot-columns/5924/2 "2022-09-09T15:49:13Z")

</div>

Hi janosch,

This is possible with the following workaround.

First, you can leverage the periodoverPeriodLastValue function in both of your calculated fields. In addition, use the difference and percent difference funtions instead of the periodOverPeriodDifference and periodOverPeriodPercentDifference functions.

For example:

periodOverPeriodLastValue(difference(distinct\_count({reference}), [{dateOfNotification} ASC],1), {dateOfNotification},QUARTER, 1)

periodOverPeriodLastValue(percentDifference(distinct\_count({reference}), [{dateOfNotification} ASC],1), {dateOfNotification} ,QUARTER, 1)

Then filter on your {dateOfNotification} field to filter to the last 3 quarters.

In addition, filter on one of your calculated fields like so:  
 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/2X/4/429f4263474958a6e84f398804d27f57e90d0c86.png)

This should result in just the last two quarters displaying in your pivot table!

Please let me know if this workaround solved your issue.

Thanks!

---

<div class="post-metadata">

**Author:** ![janosch](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@janosch](https://community.amazonquick.com/u/janosch)\
**Post date:** [September 12, 2022, 9:33am UTC](https://community.amazonquick.com/t/is-it-possible-to-hide-pivot-columns/5924/3 "2022-09-12T09:33:31Z")

</div>

Hi Peter,

I copy+pasted the new calculated fields, added them to the widget and added the filter. Q1 is not shown anymore, but the values for absolute and relative difference are wrong.

 ![Bildschirmfoto 2022-09-12 um 11.29.27](https://d1wl4jav5dp96l.cloudfront.net/original/2X/b/bf0dad0f57064256046cef7505aa289ac7d25230.png)

The values for Georgia and Germany should be zero, as there are no notifications in Q2.

The value for turkey/pepper are wrong. Absolute change is -29, relative change is -90,625%.

Also, the filter you proposed removes entries which have data only in Q3, like liquorice in the screenshot.

---

<div class="post-metadata">

**Author:** ![Koushik\_Muthanna](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/koushik_muthanna/32/3290_2.png) [@Koushik\_Muthanna](https://community.amazonquick.com/u/Koushik_Muthanna)\
**Post date:** [October 21, 2022, 1:46pm UTC](https://community.amazonquick.com/t/is-it-possible-to-hide-pivot-columns/5924/4 "2022-10-21T13:46:06Z")

</div>

Hi @janosch ,

Could you try the following method : [https://democentral.learnquicksight.online/#Dashboard-TipsAndTricks-Calculation-Year-over-Year-Table-with-Filtering-aka-Date-Hider-](https://democentral.learnquicksight.online/#Dashboard-TipsAndTricks-Calculation-Year-over-Year-Table-with-Filtering-aka-Date-Hider-)

---

<div class="post-metadata">

**Author:** ![Steph](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/steph/32/3288_2.png) [@Steph](https://community.amazonquick.com/u/Steph)\
**Post date:** [October 25, 2022, 1:23pm UTC](https://community.amazonquick.com/t/is-it-possible-to-hide-pivot-columns/5924/5 "2022-10-25T13:23:59Z")

</div>

Hi @janosch, We hope Koushik’s solution worked for you. Let us know if this is resolved. And if it is, please help the community by marking his answer as a “Solution.”
