Forum Discussion
hosea_chumba
4 years agoHelper I
The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value
Kindly assist on the below; I get the error "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value" when i input the below formula to create a column. H...
- 4 years ago
It's possible to have calculated tables inside a measure but if you want to return a table, then you need to use CALCULATETABLE rather than CALCULATE. However, since you are using _inadequate_security_ inside a SWITCH as if it is True/False, I suspect that you meant to have an argument in CALCULATE other than the filter table.
Did you intend to write something like this? (Note the line before FILTER.)
Inadequately secured loans = VAR _inadequate_security = CALCULATE ( ISEMPTY ( 'Table1' ), FILTER ( 'Table1', 'Table1'[Collateral Amount] < 1.5 * 'Table1'[Loan Amount] && NOT ( 'Table1'[Product ID] IN { 2222, 8888 } ) ) ) VAR _result_ = SWITCH ( TRUE (), _inadequate_security, "Inadeqaute Security", "Adequate Security" ) RETURN _result_
NadaFathy193
2 years agoFrequent Visitor
I have the same issue here ,plesae help me in order to solve this issue below the DAX that i used
FilteredProblemIDs =
FilteredProblemIDs =
VALUES(
'PBI Relationship'[Problem ID]
)
VAR FilteredTable =
FILTER(
'PBI Relationship',
'PBI Relationship'[RootCause1] IN {
"Planner Activity-CRQ-planning",
"Planner Activity-CRQ-Handling",
"Planner Activity-CRQ-communication",
"Planner Activity-CRQ-SecurityRecomediation"
}
&& 'PBI Relationship'[Related ID] = "cause by"
&& NOT CONTAINSSTRING('PBI Relationship'[Request Description], "CRQ")
&& 'PBI Relationship'[Association Type] = "caused by"
)
RETURN
CALCULATETABLE(
FilteredTable,
'FilteredTable'
)