Forum Discussion
KillerJ1
5 years agoRegular Visitor
Variance for Workday Last Month
Hey Everyone, I am trying to get an order count variance based on the working day last month. Here is an example of the data I would like to see. Date /Working day /Count /Previous mo...
amitchandak
Super User
5 years agoKillerJ1 , You need to have workday column in your date table
WorkDay = if(WEEKDAY([Date],2)>=6,0,1)
measure =
var _max = maxx(filter(all('Date'), Date[Workday] =1 && eomonth(Date[Date],0) = eomonth(max(Date[Date]),-1) ),[Date])
return
calculate(Sum(Table[Value]), filter(all('Date'), Date[Date] =_max)) - Sum(Table[Value])