Help converting VBA into Power Query

pmbassan

New Member
Joined
Nov 28, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hey guys!
I use this VBA since 2018, but now I want to use it in Power BI. Can someone please help me converting this from VBA to DAX, so I can use it?
The VBA calculate the period between the two dates, only considering working hours (8h30-18h30), working days, discarding weekends and holidays (holidays in Brazil are in the second page, named "Feriados").

The example is in this file: Calculadora nova_V3_Correção_Jan_2018.xlsm
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
That code is very long and doesn't seem to do anything. It would be better if you used XL2BB and copied Before and After samples (NOT screenshots!).
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,180
Members
452,615
Latest member
bogeys2birdies

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top