# Pivoting: How to get Percent for a Groups

**URL:** <https://forum.knime.com/t/pivoting-how-to-get-percent-for-a-groups/21015>\
**Category:** KNIME Analytics Platform\
**Created:** [February 13, 2020, 3:04pm UTC](https://forum.knime.com/t/pivoting-how-to-get-percent-for-a-groups/21015 "2020-02-13T15:04:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![svensch](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/7993a0/32.png) [@svensch](https://forum.knime.com/u/svensch)\
**Post date:** [February 13, 2020, 3:04pm UTC](https://forum.knime.com/t/pivoting-how-to-get-percent-for-a-groups/21015/1 "2020-02-13T15:04:44Z")

</div>

Hello everyone,

I’m trying to find a way to get something like subtotals in percent (from Excel Pivot table) in Knime.

Here is my example:  
I’m not able to get the yellow column calculated in Knime. I want to have the percent of the Product Family and Product combination.

![image](https://forum-cdn.knime.com/uploads/default/original/2X/0/0c6dc241550a9192cc73a7847ef949db9d3c59f7.png)

Any help would be appreciated.

Thanks,  
Sven

---

<div class="post-metadata">

**Author:** ![izaychik63](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/i/e9a140/32.png) [@izaychik63](https://forum.knime.com/u/izaychik63)\
**Post date:** [February 13, 2020, 4:08pm UTC](https://forum.knime.com/t/pivoting-how-to-get-percent-for-a-groups/21015/3 "2020-02-13T16:08:25Z")

</div>

Use Group by node to get group total.  
Join back to original table on group column adding total column  
Use Math Formula node to calculate %.

---

<div class="post-metadata">

**Author:** ![svensch](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/7993a0/32.png) [@svensch](https://forum.knime.com/u/svensch)\
**Post date:** [February 13, 2020, 6:21pm UTC](https://forum.knime.com/t/pivoting-how-to-get-percent-for-a-groups/21015/4 "2020-02-13T18:21:19Z")

</div>

Thank you elsamuel and izaychik63!

@izaychik63 this **works just fine**.

---

<div class="post-metadata">

**Author:** ![izaychik63](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/i/e9a140/32.png) [@izaychik63](https://forum.knime.com/u/izaychik63)\
**Post date:** [February 13, 2020, 7:42pm UTC](https://forum.knime.com/t/pivoting-how-to-get-percent-for-a-groups/21015/5 "2020-02-13T19:42:30Z")

</div>

I believe, it could be useful addition to have Group\_% option in Group by node.

---

<div class="post-metadata">

**Author:** ![ipazin](https://forum-cdn.knime.com/user_avatar/forum.knime.com/ipazin/32/806_2.png) [@ipazin](https://forum.knime.com/u/ipazin)\
**Post date:** [February 14, 2020, 9:40am UTC](https://forum.knime.com/t/pivoting-how-to-get-percent-for-a-groups/21015/6 "2020-02-14T09:40:21Z")

</div>

Hi @izaychik63,

don’t think it is really for GroupBy node as its output is grouped while here this is not the case.

Br,  
Ivan

---

<div class="post-metadata">

**Author:** ![izaychik63](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/i/e9a140/32.png) [@izaychik63](https://forum.knime.com/u/izaychik63)\
**Post date:** [February 14, 2020, 1:00pm UTC](https://forum.knime.com/t/pivoting-how-to-get-percent-for-a-groups/21015/7 "2020-02-14T13:00:32Z")

</div>

Well, it could be Group Statistics node calculating %, top-n, so on.

---

<div class="post-metadata">

**Author:** ![ipazin](https://forum-cdn.knime.com/user_avatar/forum.knime.com/ipazin/32/806_2.png) [@ipazin](https://forum.knime.com/u/ipazin)\
**Post date:** [February 14, 2020, 1:52pm UTC](https://forum.knime.com/t/pivoting-how-to-get-percent-for-a-groups/21015/8 "2020-02-14T13:52:52Z")

</div>

Hi @izaychik63,

maybe it could.

Br,  
Ivan

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [February 21, 2020, 1:53pm UTC](https://forum.knime.com/t/pivoting-how-to-get-percent-for-a-groups/21015/9 "2020-02-21T13:53:59Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
