Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
KillerJ1
Regular 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 month workday count/difference
08/19/2114105305-200
07/21/2114305205100
06/18/2114205Blank() if no dataBlank() if no data
08/18/2113150450-300
07/20/2113450300150
06/17/2113300Blank() if no dataBlank() if no data

 

I have tried so much and just can't seem to get the data to look like this. If you have a measure to grab the last months working day order count that would be amazing if you can share it. Thats the hardest part for me. Thanks! 

1 REPLY 1
amitchandak
Super User
Super User

@KillerJ1 , 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])

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.