Filter data and template within a row

Good morning,

I would like to filter certain values from diferents columns within a row and show them nicely by a template that summeries the results. Example:

Different month days informed in the same row can be labour or vacational day and we want to show wich days are vacation in that particular month.

Any tips that how we manage?

Many thanks in advanced.
Have a nice weekend.

Albert Puig

From what it sounds like, you can use a bunch of “If-then-else” columns and then compile them in a template column.

Can you show us your data structure? Do you mean you have a list of dates, and you want to filter out only dates satisfying a condition?

Exactly,

I have 31 columns that inform wether the day is laborable or vacation.
I tried to put this information all toghether in a Array but I cuuldn’t find the way to pull only the ones with certain condition. After we would need to “connect” witch day is so I can show in a template something like:

01/02/2025, 06/03/2025, 08/09/2025 are vacation days.

Here a shoot of the data columns:

Many thanks in advanced!

Albert Puig

I think you are making this way more complicated than it needs to be.

Here is how I usually go about this:

  • Firstly, I identify the weekend days. Usually (but not always), they will be Saturday and Sunday.
  • Next, I create a Public Holidays table. In this table I add all Public Holidays, one per row. The table includes the name of the holiday, and the date. I also include a math column that converts the date to YYYYMMDD format.
  • Now, for any given date, I just need the following columns:
    – A math column to determine the day of the week (Weekday(Date))
    – A math column to convert the Date to YYYYMMDD format
    – A relation that matches the previous column to the similar column in the Public Holidays table

With all the above in place, all that is required is a final if-then-else column:

  • If Public Holiday relation is not empty, then Public Holiday
  • If Weekday equals 1 (Sun), then Weekend
  • If Weekday equals 7 (Sat), then Weekend
  • Else Working Day
1 Like

Good morning Darren,

Many thanks for your tips. Very useful;)! Still would be great to know witch are the prompt in the math column to transform the date in YYYT/MM/DD ;).

On the other hand, as far as I understood, the solution you propouse shows a result per each day but what I would like to achive is a resut that sumarize certain data (filtered somhow) with the same condition within diferents columns in the same row. I guessed I might have to do an array first with thiose columns I want to point to but still I don’t figured out how I pull the filtered data…

Hope I explained better…

Many thanks in advanced!

Albert Puig

Year(Date) * 10^4
+Month(Date) * 10^2
+Day(Date)

Can you show me what your source data looks like?
For example, do you have a table where each row contains a column with a date?

My understanding is that your goal is to get a list of vacation dates from some source table, yes?

1 Like

Good morning,

Here is what rules the computed columns afterwards:

From thease days I extract weekday, vacation etc… But I have it in a same row. For instance:

Day 1: 01/01/2025; Weekday: Wednesday; LABORABLE… Each concept in a diferent column but all refering to the same day. So the idea is to extract filtered data per month. For example: Witch days are laborable in January atending what the user has customized before.

Thanks for the math column tips ;)!

Att,

Albert Puig