I have the following formula that displays a total by Day of Week (weekday) from a date in J
and amount in K
Example
J
contains 1/1/2020 … until 9/29/2020
K
contains numeric value 123 … 1999
=Query(ArrayFormula({{unique(text(J2:J,"DDDD"))},
{sumif(text(J2:J,"DDDD"),
unique(text(J2:J,"DDDD")),K2:K)}}),"Select * where Col2<0")
All the values are correct, they just are not in the order of days, ie
Sunday Monday Tuesday Wednesday … Saturday
Instead, I have the data showing like this
Friday 1,220.00
Monday 1,234.00
Tuesday 1,999.00
Thursday 1,555.00
Saturday 1,666.00
Wednesday 1,777.00
What I would want is
Monday 1,234.00
Tuesday 1,999.00
Wednesday 1,777.00
Thursday 1,555.00
Friday 1,220.00
Saturday 1,666.00
Best Answer
EDIT 2
Following OP's 2nd request
EDIT 1
Following OP's request
Just add
count(J)
as part of theselect
clausePlease use the updated formula where I also added an exclusion of Sundays and a custom format for the
Totals
column.(Compare the two and notice the different results)
Original answer
Instead of using your formula you can also use the following query
Functions used:
QUERY