Forum Discussion
sbarker_11
2 years agoHelper I
Replicating an IF statement to create Column with multiply and divide within on Power BI
I want to create a column directly in BI but i keep getting errors. ive tried multiple options like the below: Unsecured W Average = IF(DATA[Loan Type]="Status", CALCULATE(SUM(DATA[Deposit Amount])...
- 2 years ago
Ah, I see. It's because you're trying to escape a number value to a text value.
For a calculated column, this should work:
Unsecured W Average [column] = IF( DATA[Loan Type] = "Status", DATA[Deposit Amount] * (DATA[Annual Interest] / 12) )Pete
sbarker_11
2 years agoHelper I
sadly the error message is from trying it as a measure:
"Expressions that yield variant data-type cannot be used to define calculated columns."
BA_Pete
2 years agoSuper User
Ah, I see. It's because you're trying to escape a number value to a text value.
For a calculated column, this should work:
Unsecured W Average [column] =
IF(
DATA[Loan Type] = "Status",
DATA[Deposit Amount] * (DATA[Annual Interest] / 12)
)
Pete