0
votes

I need to make a total for each of the months based on the working days.

So far i have working days set as 1 if the day in the month is during Monday - Friday and 0 for Saturday and Sunday. I now need to total up the 1's and make it so that it is a single value for the month.

E.g Going the weekdays is 1 and weekend is 0, January will have 22 days on each row on the table in the data mode - January 1 = 232 January 2 = 22 etc. so i can use it to divide against my target which is set to the 1st of every month.

How can i do this??

Calendar Table

1

1 Answers

0
votes

try this. i haven't tested it.

=GROUPBY( FILTER(table, table[Working_Day]=1) , table[Month], ["new col", SUMX( CURRENTGROUP(), table[Month_Order])]) 

filter gives working day 1's data as table,then group by performed by month, then month order has been added and returns table.