How to construct a DAX measure which returns sum of either A or B. The logic is take B if A is empty. So expected results looks like this:
+---+---+----------+ |
I'd recommend using a SUMX iterator in this case.
SUMX
Measure = SUMX ( tab, IF ( ISBLANK ( tab[A] ), tab[B], tab[A] ) )
You might be able to do the following as well:
Measure = CALCULATE ( SUM ( tab[A] ) ) + CALCULATE ( SUM ( tab[B] ), FILTER ( tab, ISBLANK( tab[A] ) ) )