Dynamic Pivot Table Creation

Hi Everyone,

I’ve searched the forum for an easy step by step guide on how to build a dynamic pivot table. There have been a few discussions, but none has a very simple guide on how to get this done. My retool and javascript knowledge is very elementary, so I need all the help I can get. I can explain what I have and what I’m looking to do.

I have a table with three fields, Table_Name, Week, Row_Counts. Basically I would like to put all that info in one row, so I get the table_name, and all the Week across with the counts filled in. The issue I have is that on a weekly basis, this table adds another week and it dynamically changes. I could easily do this with static fields, but adding a week is where I’m getting stuck.

I do wish there was a pivot table to just select, and I don’t know why that isn’t even an option. From what I’ve read, I need to somehow use a Javascript Transformer which would dynamically create all the columns I need, but I have yet to get anything to work. I would really appreciate any help on this. Explain it to me like it’s my first day working with the application! Thank you!

1 Like

Hi @alitab,

I just got word internally that we are making a push to add a Pivot Table component.

I sent him this thread and will keep this post updated on any news I hear!

Hi @alitab,

It appears that the best work around would be to use custom components to build a React component that is able to accomplish the functionality you are looking for.

Check out our docs here on how to set up custom components in Retool! AI tools are very solid for helping people go from prompt to code :thinking: