AGGR expression with if condition is not working as expected
I have the below data, I am trying to get results as below, here I have 2 facts on Quarter and Month level, I need to show final results in table chart on a quarter level it should sum the fact 1 values on the quarter level if fact 1 does not exist it should take fact 2 for that month. here I am using the below expression.