Yes, what you're trying to achieve is possible in Power Query using M, but it's fairly complex due to the need to iterate over time ranges and exclude weekends and bank holidays. You'd need to write a custom function that calculates the total number of business hours between two datetime values by looping through each potential hour, checking if it's within your defined business window (8 AM to 6 PM), and ensuring the date isn’t a weekend or found in your bank holiday table.
While this is doable, it can be quite performance-intensive and hard to maintain. As an alternative, using DAX may be more manageable for this logic, especially if you use a pre-generated calendar table with working hours pre-flagged. This approach would let you calculate business durations more efficiently within your report visuals or calculated columns. Let me know if you'd like an example of either method.