Forum Discussion
Anonymous
5 years agoNot applicable
Open days to count ?
Hello,
I'm working on a dax to calculate the open days in a month. For example, I would like to calculate the open days of March month. So the dax that I wrote is :
OD = CALCULATE(DISTINCTCOUNT('Calendar'[Date]),FILTER('Calendar','Calendar'[Month]=MONTH(NOW())+1))
So the result is: 31 days, is the number of all days of March month.
Do you have any tips to calculate the open days of any month?
Thank you in advance.
Regards,
Anonymous ,
Suppose you have Date Column with Date format so create a new Calculated Column like below:
WeekdayFlag = if(weekday('Calendar'[Date]) = 1,0,if(weekday('Calendar'[Date])=7,0,1))Then take only Month in table and above calculated column so you'll something like below:
5 Replies
- amitchandakSuper User
Anonymous , Not very clear what is open days?
Total day in current month = day(eomonth(Today(),0)
Total day in next month = day(eomonth(Today(),1)
- AnonymousNot applicable
amitchandak Open days are the days that we work on: from Monday to Friday. Example for March the open days are 23, not 31. I would like to calculate it for all months !
Regards,
- Tahreem24Super User
Anonymous ,
Suppose you have Date Column with Date format so create a new Calculated Column like below:
WeekdayFlag = if(weekday('Calendar'[Date]) = 1,0,if(weekday('Calendar'[Date])=7,0,1))Then take only Month in table and above calculated column so you'll something like below: