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!
Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.
Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!
User | Count |
---|---|
111 | |
73 | |
49 | |
33 | |
33 |
User | Count |
---|---|
148 | |
95 | |
87 | |
49 | |
41 |