Forum Discussion
If Measure between two measures not summing properly
- 1 year ago
Coalesce (
[PROJECTED_SALES_Rev],
[Bud_Sales_Rev_ALL]
)
Coalesce returns the first nonblank result from the supplied parameters
If you expect 0 rather than blank
Switch (
True,
[PROJECTED_SALES_Rev] > 0, [PROJECTED_SALES_Rev],
[Bud_Sales_Rev_ALL] > 0, [Bud_Sales_Rev_ALL]
)
Since you as checking this per rows ina table you might have to use sumx.
Sumx(
Values( table[column]),
Switch (
True,
[PROJECTED_SALES_Rev] > 0, [PROJECTED_SALES_Rev],
[Bud_Sales_Rev_ALL] > 0, [Bud_Sales_Rev_ALL]
)
)
Coalesce (
[PROJECTED_SALES_Rev],
[Bud_Sales_Rev_ALL]
)
Coalesce returns the first nonblank result from the supplied parameters
If you expect 0 rather than blank
Switch (
True,
[PROJECTED_SALES_Rev] > 0, [PROJECTED_SALES_Rev],
[Bud_Sales_Rev_ALL] > 0, [Bud_Sales_Rev_ALL]
)
Since you as checking this per rows ina table you might have to use sumx.
Sumx(
Values( table[column]),
Switch (
True,
[PROJECTED_SALES_Rev] > 0, [PROJECTED_SALES_Rev],
[Bud_Sales_Rev_ALL] > 0, [Bud_Sales_Rev_ALL]
)
)