Rule Based Column Filter

Hello everyone,

right now I am facing the issue that I have a databases is showing the full last year 1-12.2021 and also the actual year 01-08.2022. In the next month one column 09.2022 will extend the table. Therefore I will have a column set for the years of 24 columns maximum.

I want only the selection of the last 12 months. Which means if we are acutally in August I just want to have the selection of the columns with data from the 08.2021 - 07-2021.

Is there any way I can come to a solution? I know that normally you should build up the data base on a vertical way if you want to work with dates, but I need that format to see the development of the figures of the past 12 months.

Thank you in advance.

Hi @aw15281 , to answer your question, you can use the Column Filter node and manually select which ever columns you want to keep and remove via the UI.

Hello @bruno29a,

I know the column filter node. But since the data base changes every month I dont want to make the selection manually. So I need to find a logic to do it automatically via a logic.

Next month I will need the range 09.2021- 08.2022

Hello @aw15281,

just thinking a litte outside the box can do the job.


1 Like

@morpheus, Thank you I will check it directly

It works thank you very much!

A lot of new nodes for me :slight_smile:

Hi @aw15281 I could guess that you wanted this to be done “automatically”, but since it was not mentioned, I did not want to make a wrong assumption and start putting efforts in building something that might not have been want you needed, hence why I put the emphasis that I was answering your question.

It’s always better to give as much details as you can so that the solution can be precise, and of course avoid unnecessary back and forth which creates delays in getting the solution.

You can also provide some data that we can use to work with so that we do not spend time re-creating the context or what you have been able to come up with already, and focus entirely on building the solution.

That being said, the solution that @morpheus is one way to do this - the only thing missing that I can see there is something to get the current date, so that the workflow knows that today we’re in the month of 08.2022 and when it’s executed next month, that we’re in 09.2022.

You can use the Create Date&Time Range node for this and configured like this:

This will give you the current date, which you can then convert to a variable which will take the current date dynamically whenever you run the workflow.

1 Like

Thank you very much.

Next time I will make it more clear and provide a data set. Thanks for helping me out!

I really love this Platform since you get a reply for your challenges so fast. Thank you very much


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