# How to remove "empty" rows in Quicksight Pivot Table with multiple rows

**URL:** <https://community.amazonquick.com/t/how-to-remove-empty-rows-in-quicksight-pivot-table-with-multiple-rows/37303>\
**Category:** Q&A\
**Tags:** Business-Intelligence-Engineer, quick-sight\
**Created:** [October 22, 2024, 12:55pm UTC](https://community.amazonquick.com/t/how-to-remove-empty-rows-in-quicksight-pivot-table-with-multiple-rows/37303 "2024-10-22T12:55:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sohelpm](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@sohelpm](https://community.amazonquick.com/u/sohelpm)\
**Post date:** [October 22, 2024, 12:55pm UTC](https://community.amazonquick.com/t/how-to-remove-empty-rows-in-quicksight-pivot-table-with-multiple-rows/37303/1 "2024-10-22T12:55:26Z")

</div>

I have prepared a pivot table in quicksight dashboard. There are 9 rows in the pivot table which are hierarchy based. level 1 , level 2, level 3 till level 9. So product in a hierarchy may have further hierarchy or it may not. And on top of it some calculated fields are added in values so that those values can be checked for each level of hierarchy in pivot drill down. The issue here is, for the hierarchies where no further products are available, the rows keep on showing “empty” in further drill downs till level 9. e.g. any product which is having products till hierarchy level 5, shows empty rows for more 4 drill downs with the same values. How to restrict drill downs to the level the data exists or remove the “empty” rows ?  
I have tried removing blanks via filter by removing blanks but it removes the product line altogether.

---

<div class="post-metadata">

**Author:** ![royyung](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/royyung/32/3302_2.png) [@royyung](https://community.amazonquick.com/u/royyung)\
**Post date:** [October 22, 2024, 1:16pm UTC](https://community.amazonquick.com/t/how-to-remove-empty-rows-in-quicksight-pivot-table-with-multiple-rows/37303/2 "2024-10-22T13:16:30Z")

</div>

seems it was caused by the logic in calculated field. Can show the script of the calculated field? and a screenshot of the dashboard?

---

<div class="post-metadata">

**Author:** ![sohelpm](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@sohelpm](https://community.amazonquick.com/u/sohelpm)\
**Post date:** [October 22, 2024, 1:47pm UTC](https://community.amazonquick.com/t/how-to-remove-empty-rows-in-quicksight-pivot-table-with-multiple-rows/37303/3 "2024-10-22T13:47:48Z")

</div>

Hi, @royyung, Thank you for replying. The value fields are straightforward calculations for net revenue, infra cost etc. for example “ifelse({category}=‘Net Revenue’, {actual\_amount}, 0)” that gives me net revenue. The issue I am facing is in the row fields being empty.  
I am trying to put it once again : Let’s assume Product- A sits on first row of pivot table which level 1 hierarchy for me, Now it has further levels of sub-products which sit on level 2 hierarchy i.e. second row of my pivot table. Now, if i click on the (+) icon beside product- A, it will drill it down and show sub-products of A and show values of those sub-products. In case some products sitting a level 1, for example Product-G, have no further sub-products, then in that case it should not show (+) for those products but it still shows the drill option and shows “empty” as row till whatever the number of rows I have entered in the pivot table. I want to restrict the drill down before empty part or know in which way I can hide/ remove those empty rows so that it will show drill down till the level where data exists. If I go the row filter for level 2 and remove the blanks, then product-G is removed altogether from the pivot table.

---

<div class="post-metadata">

**Author:** ![royyung](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/royyung/32/3302_2.png) [@royyung](https://community.amazonquick.com/u/royyung)\
**Post date:** [October 22, 2024, 3:06pm UTC](https://community.amazonquick.com/t/how-to-remove-empty-rows-in-quicksight-pivot-table-with-multiple-rows/37303/4 "2024-10-22T15:06:13Z")

</div>

I have tried and cannot see the issue you mentioned  
 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/3X/e/c/eca6930fec601c2bcc9f1707307bca810ff8fd8b.png)

can try to create a sample in Arena according to this page?

> [@QuickSight Arena -- An embedded instance of QuickSight within the QuickSight Community](https://community.amazonquick.com/t/quicksight-arena-an-embedded-instance-of-quicksight-within-the-quicksight-community/21437):
>
> Watch this video for a 30 second intro to Arena. QuickSight Arena provides you with an embedded instance of QuickSight right within the QuickSight Community. Using Arena, you can: Explore creating QuickSight data visualization dashboards for free Publish dashboards to the Community [Gallery](https://community.amazonquick.com/c/gallery/44) to showcase your skills Include dashboards depicting your use case while posting questions in the [Community Q&A](https://community.amazonquick.com/c/question-and-answer/5) Clone underlying analysis views of published dashboards in order …

---

<div class="post-metadata">

**Author:** ![Brett](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/brett/32/36494_2.png) [@Brett](https://community.amazonquick.com/u/Brett)\
**Post date:** [November 5, 2024, 11:03pm UTC](https://community.amazonquick.com/t/how-to-remove-empty-rows-in-quicksight-pivot-table-with-multiple-rows/37303/5 "2024-11-05T23:03:56Z")

</div>

Hi @sohelpm,  
It’s been awhile since we last heard from you, did you have any additional questions regarding your initial post?

If we do not hear back within the next 3 business days, I’ll go ahead and close out this topic.

Thank you!

---

<div class="post-metadata">

**Author:** ![Brett](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/brett/32/36494_2.png) [@Brett](https://community.amazonquick.com/u/Brett)\
**Post date:** [November 8, 2024, 7:47pm UTC](https://community.amazonquick.com/t/how-to-remove-empty-rows-in-quicksight-pivot-table-with-multiple-rows/37303/6 "2024-11-08T19:47:40Z")

</div>

Hi @sohelpm,  
Since we haven’t heard back, I’ll close out this topic. However, if you have any additional questions, feel free to create a new topic in the community and link this discussion for relevant information if needed.

Thank you!

---

<div class="post-metadata">

**Author:** ![Brett](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/brett/32/36494_2.png) [@Brett](https://community.amazonquick.com/u/Brett)\
**Post date:** [November 8, 2024, 7:47pm UTC](https://community.amazonquick.com/t/how-to-remove-empty-rows-in-quicksight-pivot-table-with-multiple-rows/37303/7 "2024-11-08T19:47:44Z")

</div>

Archived on November 8, 2024, 7:47pm UTC


