Forum Discussion
rwyoung01
7 years agoFrequent Visitor
SelectedValues will not filter on multiple values
I am trying to filter a table based on certain values in a column and am getting an error message that the expression refers to multiple columns which cannot be converted to a scalar value
AccountTypeWPrisoner = if (SELECTEDVALUE('Main Account'[AccountType]) = "Main Account Types(with Prisoners)", FILTER(Accounts,Accounts[AccountType] in {"Business","Chaplain","Church","Directgiv","Ministry","Minor","Prisoner","Regular","Orgcontact"}))
10 Replies
- ElenaNResolver V
Hello,
What data types are 'Main Account'[Account Type] and 'Accounts'[Account Type] ?
Regards,
ElenaN
- rwyoung01Frequent Visitor
Text
- v-cherch-msftMicrosoft Employee
Hi rwyoung01
You may try below measure and drag it into table visual or use it as visual level filter.If it is not your case,please show us some screenshot of the table and error.
AccountTypeWPrisoner = IF ( SELECTEDVALUE ( 'Main Account'[AccountType] ) = "Main Account Types(with Prisoners)" && MAX ( Accounts[AccountType] ) IN { "Business", "Chaplain", "Church", "Directgiv", "Ministry", "Minor", "Prisoner", "Regular", "Orgcontact" }, 1 )Regards,
Cherie