Forum Discussion
Substitute 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 like to use the value, from one table, G Calculated Electricity % dimPeriod into the column "NewElec%", otherwise use the value, G Calculated Electric % factMeterReading from a second table. My statement for the calculated column is:
- 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
6 Replies
- CalClackHelper II
I'll give it a shot. Thanks for the rapid reply
- CalClackHelper II
- CalClackHelper II
AZ38,
I'd like to pursue your proposed solution, but I'm not understanding the format you have propsed. I should have probably attacked it from the backend at the database level, but if you technique works, then that would be another feather in the hat.
- AnonymousNot applicableHi. 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- CalClackHelper II
Thanks, I will take a look at the ETL phase of calculating.