Forum Discussion
CalClack
Helper II
6 years agoSubstitute Value using If Then Else
I would like to a calculated column value from one table if condition is true, else use a column value from another table if false. For instance in the screen shot if Ithere is a value > 0.00, I'd li...
- Anonymous6 years agoHi. First, there's no screenshot. Second, a calculated column like this should be created and calculated during the ETL phase, possibly in Power Query. Calculated columns are not compressed optimally when created with DAX.
Best
D
az38
Community Champion
6 years agoHi CalClack
try smth like
NewElec% =
var _maxDimPeriod = CALCULATE(max('dim_Period'[G Calculated Electricity % dimPeriod]))
RETURN
IF(_maxDimPeriod > 0,
_maxDimPeriod ,
max('fact_MeterReading'[G Calculated Electric % factMeterReading])
)CalClack
Helper II
6 years agoI'll give it a shot. Thanks for the rapid reply