0
votes

I have a table A with these columns: site_name, monthly_productibility. I also have a table B with these columns: site_name, monthly_production.

I want to divide the column monthly_productibility (table A) by the column monthly_production (table B).

When I try the DIVIDE function (fast measure or DAX function):

DIVIDE(
    SUM('TABLE_B'[monthly_production]),
    COUNTA('TABLE_A'[monthly_productibility]))

The results are just so wrong, I tried different formulas but still doesn't work and I want to merge the tables only if I am obligated to do so (I am more into a generic approach).

2
Are the tables related? How is the relationship between both tables? - Agustin Palacios
Table relation and cardinality is important. Let us know the details. - mkRabbani

2 Answers

0
votes

Try this as a measure in tableA:

test = DIVIDE(SUM(tableA[monthly_productibility]), SUM(TableB[monthly_production]))
0
votes

I found the result, it is :

DIVIDE(
    SUM('TABLE_B'[monthly_production]),
    AVERAGE('TABLE_A'[monthly_productibility]))