Making a chart between using 3 differents tables

Hi everyon! I have a problem with a Donnut Chart in my app and need a help.

I have 3 tables: Movimentação, Categoria and CentroCusto.

Into Movimentação I put all my financial details and use a column ref to “Categoria” to categorize them.
Also, in the same form, I use a column ref to CentroCusto to categorize the source of cost.

So, my issue is: I have a Donut chart with the sum of all the cost ([Valor]) filtered by “CentroCusto”, and I need to make a detail view so if an user click on the chart He see into Details a Donut chart with all the costs based in “Categoria” and only for the “CentroCusto” clicked.

I try to dereference [Related Movimentação] in the table “Categoria” and them compare to [Related Movimentação] in “CentroCusto” but I can’t create a chart with this.

So, how can I create a chart related by 3 differents tables?

Sorry for my english, still learning.