Forum Discussion
Calculate working days from multiple rows on the same date
Hi,
I am using the day name from a Date column to work out whether it is a 'Work Day' or not:
2 measures are as follows:
However, my DISTINCT() function doesn't appear to work. For example I get 34 work days in Jan which corresponds with the total number of rows for Jan:
Why does my 2nd filter not work? Is there an easier way to do this?
Thanks,
Josh
JoshuaMartinezP Try this. PBIX is attached below signature.
No. of Work Days = COUNTROWS(DISTINCT(SELECTCOLUMNS(FILTER('Table', [TS is work day] = TRUE),"Date",[Date])))
7 Replies
- Greg_DecklerCommunity Champion
JoshuaMartinezP Use NETWORKDAYS?
- JoshuaMartinezPRegular Visitor
Hi Greg,
Thanks for the fast reply.
NETWORKDAYS requires me to specify holidays etc. It also gives me the total number of all 'work days' but I want only the work days that have been worked on, as indicated by my row data.
If I use the row data then I will only pull through the work days of the month that need to be counted. Which is why I am trying to use a CALCULATE filter.
Thanks,- Greg_DecklerCommunity Champion
JoshuaMartinezP Holidays is optional. If you can post sample data as text I can take a look.