Forum Discussion
chris05
2 years agoFrequent Visitor
Expressions that yield variant data-type cannot be used to define calculated columns
Hi I'm new to Power BI. Can anyone help me on this error, please "Expressions that yield variant data-type cannot be used to define calculated columns" RemainingSlots = SWITCH( TRUE(), [Max]...
- 2 years ago
You are trying to return both text and numbers in that column,
RemainingSlots = SWITCH( TRUE(),
[Max] = 0, "x",
[Max] - [Min] = 0, "full",[Max] - [Min] < 0, "less",
[Max] - [Min] > 0, FORMAT([Max] - [Min],"#")
)
lbendlin
2 years agoSuper User
You are trying to return both text and numbers in that column,
RemainingSlots = SWITCH( TRUE(),
[Max] = 0, "x",
[Max] - [Min] = 0, "full",
[Max] - [Min] < 0, "less",
[Max] - [Min] > 0, FORMAT([Max] - [Min],"#")
)