I'm not following your sample formula. What is 'Dedicated' in your formula? Is this a static variable? Is it meant to be the sum of hours which is dedicated?
Please provide a better example using Excel to calculate your expected results and additionally, please attach a Tableau Packaged Workbook including your sample data. It would be good to see how far you've actually gotten with this.
Have you looked at Level of Detail calculations?
It's a column which provides me information about whether resources are 'Dedicated' or 'Not Dedicated'.
I need to calculate sum of hours of resources who are dedicated and who spend time on pre sales and business development, across each practice.
Sorry, can not upload workbook since its confidential.
While your data may be confidential, you can go ahead and create a scenario with some mock data, connect Tableau to this and create a Tableau Packaged Workbook.
Additionally, it would be really helpful if you created an excel workbook based off your sample data to show how you're calculating your expected results.