Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I am new to writing DAX and trying to write the below IF statement:
Forecast/Actual= If TableX(actual amount) has a value, use TableX(actual amount) value. If TableX(actual amount) has no value, use Table Y(forecast amount)
No value meaning blank or 0.
Any help would be greatly appreciated! Thanks in advance
DAX offers the ISBLANK() function that you can use to solve part of your problem.
VAR replace = OR(IF( ISBLANK(TableX[actual amount]) , TableX[actual amount] =0)
RETURN IF(replace,tabley[forecast amount],tablex[actual amount])
this separates the test for whether or not you want to replace the value by using the OR function, if either of the arguments to OR is true it returns true.
If replace = true then you return the forecast, otherwise the actual
Help when you know. Ask when you don't!