Hi,
I am working on a project where I would need to add the cost of services that is grouped by the month and client. Below is an example of how I would like the table to be:
Client_Name | Cost_Of_Services | Service Month | Jul_Cost | Aug_Cost |
Bobby | $15.00 | 1 | $54.00 | $26.00 |
Bobby | $15.00 | 1 | $54.00 | $26.00 |
Bobby | $24.00 | 1 | $54.00 | $26.00 |
Bobby | $10.00 | 2 | $54.00 | $26.00 |
Bobby | $11.00 | 2 | $54.00 | $26.00 |
Bobby | $5.00 | 2 | $54.00 | $26.00 |
James | $20.00 | 1 | $41.00 | $0 |
James | $21.00 | 1 | $41.00 | $0 |
So far, the steps that I have tried was grouping the data by Client_Name and then by Service month. Then create a computed column to add DISTINCT Cost_Of_Services. This works but if there is a duplicate in the cost of service for a service month, such as the above table has, it does not add them correctly.
If anyone can help on this that would be great. Thank you!