This is follow up question of the one asked here. However this time two columns have different granularity and are located in different tables. So simple SUMX
solution proposed earlier is not applicable. I attach SumDifferntGranularity.pbix file.
How to construct a DAX measure which returns sum of either BudgetProduct (if possible) or BudgetBrand. The logic is take Brand if Product is empty. So expected results looks like this:
+---------+-------------+---------------+-----------------+
| Manager | BudgetBrand | BudgetProduct | Expected result |
+---------+-------------+---------------+-----------------+
| Alice | 16 | 15 | 15 |
| John | 7 | | 7 |
| Martha | 21 | 21 | 21 |
| Zadar | 11 | | 11 |
+---------+-------------+---------------+-----------------+
| Total | 55 | 36 | 54 |
+---------+-------------+---------------+-----------------+
In this example, all Managers have budget defined on Brand, but some Managers (Alice and Martha) have budget defined on Products. How to construct a measure which will take budget defined on products, if possible, but if not possible then it will take the budget defined on Brands.