Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
probably a very simple task but im not getting the right syntax.
So I have 2 columns
Date | profit
01.01.2020 | 100
02.01.2020 | 80
... | ..
Now I want to sum only the profit of the Days (Monday to Friday).
And i dont want to create a new column. I want to compute this in a formula.
My idea was like:
If(Weekday(Date)='Sa.' Or Weekday(Date)='So.',0,sum(profit))
That is not working. Maybe i have to do it with an 'Aggr' but i dont know exactly how to do it.
Thanks in advance . 🙂
Your if() needs to be inside your sum(), not vice versa. You need the if() statement evaluated for each row, but then you get a bunch of different sums with nothing to aggregate them.
sum(If(Weekday(Date)='Sa.' Or Weekday(Date)='So.',0,profit)
Your if() needs to be inside your sum(), not vice versa. You need the if() statement evaluated for each row, but then you get a bunch of different sums with nothing to aggregate them.
sum(If(Weekday(Date)='Sa.' Or Weekday(Date)='So.',0,profit)
Thanks 🙂
It´s perfect