Forum Discussion
Replicating an IF statement to create Column with multiply and divide within on Power BI
- 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
Hi sbarker_11 ,
I may be reading this incorrectly, but it looks like it should be:
Unsecured W Average =
IF(
DATA[Loan Type] = "Status",
SUM(DATA[Deposit Amount]) * (DATA[Annual Interest] / 12),
""
)
Pete
- sbarker_112 years agoHelper I
Hi,
I receive the following error Expressions that yield variant data-type cannot be used to define calculated columns.
- mlsx42 years agoMemorable Member
- sbarker_112 years agoHelper I
I need a calculated column to mirror this excel formula, measures arent working:
=IF(Z2="Fixed Loan (Unsecured)",U2*(V2/12),"")
if [Loan Status] = "Fixed Loan (Unsecured)" then [Deposit Amt] * (Annual Interest / 12) if not then blank.
i already have a measure for annual interest/12 which is
Monthly Interest =DIVIDE(SUM('DATA'[Annual Interest]), 12)
- BA_Pete2 years agoSuper User
Try creating it as a measure, not a calculated column.
Pete
- sbarker_112 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."