Group Data by Year

Hello,

in one of my datasets I have a date column. Is there a way I can group this and count by Year only? I know I can group them by the whole date but is there a way to do it by year. Thanks!

image.png

Answers

  • I know probably I can do it by first transform that data and just leave the first 4 digits, save it and then group and count, but we got some questions that people would like to do it during profiling of the table.

  • Josh Boxer
    Josh Boxer Administrator

    You are correct that would need to add a new column using a Transform step and the Substring Function to create a Year column that can be grouped on

    image.png
  • Henry Simms
    Henry Simms Administrator

    There's also a Parse Date function which could help here:

    Once the value is a "Date" datatype, you can use the Get Years function. You can Profile the resulting output in a Workflow