Forum

RelationShip (again...
 
Notifications
Clear all

RelationShip (again ...)

2 Posts
2 Users
0 Reactions
59 Views
(@brunomelki)
Posts: 46
Trusted Member
Topic starter
 

Mynda,

Sorry for that second shot about relationship but something seems to be difficult to catch. (I had to delete the model I created in the file to upload it. It was just uploading the 2 tables to a model and connect between TransactID.)

I get these lists from an SQL db. From that, I want to calculate the net income of the different works or workers. I cannot create a relationship between these lists to work with.

Given :

  1. dbo_ServiceSales : include the WorkerID and WorkID.
  2. dbo_Receipts : Include the Total_Income of the overall activity and I want to check how much each worker and each work are doing.
  3. Both tables have the TransactID column which is the payment ID in fact for a work done by a worker. It is possible that one transact include several works or several workers as you can see in “details sheet”. (each customer may pay in one transact for several works done and this can be done by different workers also)

The correct amount of money is the Total_Income from the Receipt table and I want to get the  money every worker and every work is making (per time unit for example).

I can connect the tables in the model, but when I configure my pivot table to return the Total_Income per WorkerID, it says that I need to create a relationship.

 

Either I do not understand something elementary in the relationship therefore I cannot think of a way to overcome or fix the item, or the issue is I cannot filter the Total_Income because I have many workers ID and works ID.

Can you help me to understand that?

Thanks,

Bruno Melki

 
Posted : 01/04/2022 10:17 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Bruno,

Seeing that your receipt table contains a distinct list of TransactIDs, you can use this as your lookup table. You can then create a PivotTable that lists the Total_Income and DiscountPrice by TransactID. 

In a separate PivotTable you can see total income per workerID, but you can't compare it at worker ID level to Total_Income because you don't have total income split by worker ID in the Receipt table. 

You can download the example file here (it's too big to upload to the forum now I've added the PivotTables and data model)!

Mynda

 
Posted : 01/04/2022 7:07 pm
Share: