# How to create a histogram with the year without the years adding up in other columns?

**URL:** <https://forum.knime.com/t/how-to-create-a-histogram-with-the-year-without-the-years-adding-up-in-other-columns/69198>\
**Category:** KNIME Analytics Platform\
**Tags:** node\
**Created:** [June 12, 2023, 4:50am UTC](https://forum.knime.com/t/how-to-create-a-histogram-with-the-year-without-the-years-adding-up-in-other-columns/69198 "2023-06-12T04:50:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Perciliano](https://forum-cdn.knime.com/user_avatar/forum.knime.com/perciliano/32/55093_2.png) [@Perciliano](https://forum.knime.com/u/Perciliano)\
**Post date:** [June 12, 2023, 4:50am UTC](https://forum.knime.com/t/how-to-create-a-histogram-with-the-year-without-the-years-adding-up-in-other-columns/69198/1 "2023-06-12T04:50:15Z")

</div>

Dear,  
I’m using KNIME 4.7.2. In the project I have data with the year column and I would like to create a histogram or bar chart with the year columns. I created it, however, the number of records is always wrong and, depending on the adjustments of the parameters in the histogram node, or the number is added to the first column of the year or the last, has anyone gone through this or knows how to solve it?  
Here are some images:  
Image 1 - Example of the flow  
Image 2- Result of the “Group By” node  
Image 3- Result of the “Histogram” node  
Image 4- Configuration of the “Group By” node

![](https://lh3.googleusercontent.com/tyRGGRXakQ_pmhGOJ3xt2Nqtrjy4xFOS8QnrEHE1T5QfMJR52bVhLexoZ2IgcAD85GJp3b7nHQgCGUfSGNCMXyFfSI81R8uaeqqFjOsNAwtvfZ_Mz1YIfCCbOHIsBb3ryAfws8gUQ-F_Nu6cPpPqzQILH5yNPrHYoGwa4dg6Y5bdxfklwt5AqcO8d5aedg)

Image 1

![](https://lh5.googleusercontent.com/5MvuflR3s9EemrK8t1JyyEADO2b410Bigihe7TXgrPTkimPtuqPsMqxXXRcCExi6XVxqIxBOfRAJ8MCyZsjL5tmai7HkYa78F9Fu6DYnPgkDX6_n-DZ6GCBW8oj4TVkKLdxR_AbPYuOJhYw0Ya-v725xcYNE5WZGuL9I1fZHN3M91m5oJA1PQvGAQZJaww)

Image 2

![](https://lh3.googleusercontent.com/TqFu27U3jFrMQRa8wyFSJtVtpzD3krsLYJda0QrYGTwH-sq_Ey9SZGD7sz3ZDtpHueP0anEMmF7yuPGhPWyFzDvJ2FXv36dwUwcPJl2vthw5sd6GnRKoYYOWDUHQFq_cEfWKgypLxjuBrab9WjipsIOykT1Y8TZ90oD4TDWCmPfdtHieRbyr5BgHTeItOw)

Image 3

![](https://lh5.googleusercontent.com/EmOgW-MSJhsSNKQtZN3kx3UwmeDOhL_ux1Lm0hOMGA1HtGbydRJv9qOLfNypuy08fdPxSUFLUB2F4WeGz7P7IsLQUXMQPSm-IQfWrBLDcxysjpKdiLMq9v2d219JhK1v9y0DwdEM0MR-SvcMxsj_W24wvy6XJEjJ8jSTzs4Lzu4_nuccvHE2kjIg08HD8g)

Image 4

As seen in image 2, the histogram does not show all the years with their correct amounts, how to adjust this?

---

<div class="post-metadata">

**Author:** ![nan](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/n/cc9497/32.png) [@nan](https://forum.knime.com/u/nan)\
**Post date:** [June 12, 2023, 7:43am UTC](https://forum.knime.com/t/how-to-create-a-histogram-with-the-year-without-the-years-adding-up-in-other-columns/69198/2 "2023-06-12T07:43:05Z")

</div>

Hi, with this kind of data, it is best to use the Bar Chart node, since your groups/binning (i.e., the years) are already well defined. The Histogram node is better suited for continuous data that requires some binning to be performed before plotting.

---

<div class="post-metadata">

**Author:** ![Perciliano](https://forum-cdn.knime.com/user_avatar/forum.knime.com/perciliano/32/55093_2.png) [@Perciliano](https://forum.knime.com/u/Perciliano)\
**Post date:** [June 12, 2023, 10:54pm UTC](https://forum.knime.com/t/how-to-create-a-histogram-with-the-year-without-the-years-adding-up-in-other-columns/69198/3 "2023-06-12T22:54:46Z")

</div>

@[nan](https://forum.knime.com/u/nan), thanks for the answer. In the option “Category Column”, it’s don’t shows the column year “Ano Tweet”. In the image I put my options.

The execution of this node is taking more than 15 minutes and to show the graph another 10 minutes and sometimes it does not generate anything on the graph. After many minutes it generates a graph, but I have no way of knowing if it is processing.

**![](https://lh3.googleusercontent.com/fs5wkDx_52Gt_2JB2LSSvFnJFlVtsU2LlKZBJscN3xT3xzrX8aWgPJ4AZ1x9BQt_kxtD-8PQWRVncWHMmVsQ-ZijTD15euT508g7XBxcXoMshhltqTlsWBCiU0OKeYMtQOrsMmjbJ8DKtArjbhAvW5IpmSaCG4NuunZTf0ciSMZ-D_jML171cCSj_UGPIg)**

Thanks!

Perciliano

---

<div class="post-metadata">

**Author:** ![Perciliano](https://forum-cdn.knime.com/user_avatar/forum.knime.com/perciliano/32/55093_2.png) [@Perciliano](https://forum.knime.com/u/Perciliano)\
**Post date:** [June 13, 2023, 5:21am UTC](https://forum.knime.com/t/how-to-create-a-histogram-with-the-year-without-the-years-adding-up-in-other-columns/69198/4 "2023-06-13T05:21:20Z")

</div>

Hi @nan , I Got it! I changed the year column to String.

Thanks! 👍🏿

---

<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:** [June 20, 2023, 5:22am UTC](https://forum.knime.com/t/how-to-create-a-histogram-with-the-year-without-the-years-adding-up-in-other-columns/69198/5 "2023-06-20T05:22:00Z")

</div>

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