Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I need some help. I need to calculate the costs based on a data set. The dataset contains date, process and resource (table 1).
I need to find out how many processes are running from each resource (Table 2, Column: Resource Count) (Note: there are three resources). Then, based on the resource and server cost, I need to calculate the cost of each process (Table 2). The formula is given below:
cost = (2000+4000)/Resource Count
Explanation: The cost for each process would be devided by the resource. For example: Resource 1 has two processes. This means that the costs (2000+4000) would be divided equally between two processes (3000).
It would be great if anyone could provide any solution. I need to display the below Table 2 as Table in report field except resource and server cost column.
Table 1:
| Date | Process | Resource | Time (sec) |
| 01.07.2024 | A | 1 | 46 |
| 01.07.2024 | A | 1 | 32 |
| 01.07.2024 | B | 1 | 38 |
| 01.07.2024 | B | 1 | 64 |
| 01.07.2024 | B | 1 | 28 |
| 01.07.2024 | C | 2 | 9 |
| 01.07.2024 | D | 3 | 24 |
| 01.07.2024 | E | 3 | 78 |
| 02.07.2024 | A | 1 | 80 |
| 02.07.2024 | A | 1 | 64 |
| 02.07.2024 | B | 1 | 59 |
| 02.07.2024 | B | 1 | 39 |
| 02.07.2024 | B | 1 | 41 |
| 02.07.2024 | C | 2 | 52 |
| 02.07.2024 | D | 3 | 14 |
| 02.07.2024 | E | 3 | 53 |
| 03.07.2024 | A | 1 | 16 |
| 03.07.2024 | A | 1 | 13 |
| 03.07.2024 | B | 1 | 79 |
| 03.07.2024 | B | 1 | 53 |
| 03.07.2024 | B | 1 | 34 |
| 03.07.2024 | C | 2 | 74 |
| 03.07.2024 | D | 3 | 97 |
| 03.07.2024 | E | 3 | 55 |
| 04.07.2024 | A | 1 | 55 |
| 04.07.2024 | A | 1 | 52 |
| 04.07.2024 | B | 1 | 95 |
| 04.07.2024 | B | 1 | 87 |
| 04.07.2024 | B | 1 | 55 |
| 04.07.2024 | C | 2 | 75 |
| 04.07.2024 | D | 3 | 92 |
| 04.07.2024 | E | 3 | 95 |
| 05.07.2024 | A | 1 | 51 |
| 05.07.2024 | A | 1 | 67 |
| 05.07.2024 | B | 1 | 9 |
| 05.07.2024 | B | 1 | 35 |
| 05.07.2024 | B | 1 | 42 |
| 05.07.2024 | C | 2 | 59 |
| 05.07.2024 | D | 3 | 64 |
| 05.07.2024 | E | 3 | 21 |
| 06.07.2024 | A | 1 | 62 |
| 06.07.2024 | A | 1 | 3 |
| 06.07.2024 | B | 1 | 90 |
| 06.07.2024 | B | 1 | 39 |
| 06.07.2024 | B | 1 | 49 |
| 06.07.2024 | C | 2 | 48 |
| 06.07.2024 | D | 3 | 11 |
| 06.07.2024 | E | 3 | 73 |
| 07.07.2024 | A | 1 | 30 |
| 07.07.2024 | A | 1 | 30 |
| 07.07.2024 | B | 1 | 41 |
| 07.07.2024 | B | 1 | 66 |
| 07.07.2024 | B | 1 | 92 |
| 07.07.2024 | C | 2 | 80 |
| 07.07.2024 | D | 3 | 58 |
| 07.07.2024 | E | 3 | 5 |
Table 2:
| Process | Resource Count | Resource Cost | Server Cost | Total Cost |
| A | 2 | 2000 | 4000 | ((2000+4000)/Resource Count) = 3000 |
| B | 2 | 2000 | 4000 | (2000+4000)/Resource Count = 3000 |
| C | 1 | 2000 | 4000 | (2000+4000)/Resource Count = 6000 |
| D | 2 | 2000 | 4000 | (2000+4000)/Resource Count = 3000 |
| E | 2 | 2000 | 4000 | (2000+4000)/Resource Count = 3000 |
Solved! Go to Solution.
@ekramulmostaqui
Updates PBIX has the required solution.
If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!
Follow me on LinkedIn!!!
Hi @NaveenGandhi,
Thanks for the solution. But I would like to clarify a bit about the resource count. I need to calculate how many processes are handled by a resource. The resource and server cost is equally divided by each process.
I have seen your solution. You have counted resources 14 and 21 for process A and B. But it should be 2. Because resource 1 is occupied by 2 processes.
@ekramulmostaqui
This is bit confusing, So you need to calculate how many process is occupied by a resource, Then why do you have the process names in table 2, should'nt the table be like this for clear representation?
Resouce P Count Cost
| 1 | 2 | 3000 |
| 2 | 1 | 6000 |
| 3 | 2 | 3000 |
Thanks,
NG
Hi @NaveenGandhi,
For better understanding, I have added the resource count column in the Table 2.
I need to show the costs incurred for each process. Therefore, I only need two columns - the process name and the total cost (the columns resource count, server cost and resource cost are additional).
Regards,
Ekram
@ekramulmostaqui
Updates PBIX has the required solution.
If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!
Follow me on LinkedIn!!!
hi @ekramulmostaqui
For the provided dataset i have made a solution. Let me know if this is what you are looking for and needs any more help.
If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!
Follow me on LinkedIn!!!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.