Forum Discussion
FILTER ALL Syntax Troubles
Im trying to clear the filter applied by a visual on another table and cant figure out where I am going wrong. My formula is:
Measure 2 = FILTER(ALL(TableName),IF([ColumnName]=0 && [ColumnName2]="Yes",[EmployeeName]))
I keep getting the error 'The expression refers to multiple columns. Multiple columns cannot be converted to scalar value."
Any direction as to where I am going wrong?
4 Replies
- MFelixSuper User
Hi CEllinger ,
What is the purpose of your measure?
Do you want to returnthe Employee Name if the two columns refer to the parameters you have?
Beloieve that the problem is that filter function returns a table and you are trying to assign it to a scalar value (a measure). So the result is not possible.
The FILTER syntax should be used as last parameter of a CALCULATE or as part of a group by of a table, and then apply a summarization to those values.
Your measure should be something like:
Measure 2 = CALCULATE( IF([ColumnName]=0 && [ColumnName2]="Yes",[EmployeeName]);FILTER(ALL(TableName))
However without any data is difficul to give you an answer can you share some sample data and expected result?
Regards,
MFelix
- CEllingerHelper I
MFelix , I am trying a different tack to solve a problem that has been vexing me for a while. Right now, I have a dynamic visual that changes two tables in the exact same way. Im trying to figure out how exactly the filter context works to see if I can use the same dynamic visual to produce multiple distinct tables.
Video of fields changing as I click on dates.
I have the same fields populating the tables. When I click a date, I want one table to show the responses filtered by visual and other table to show the table I was describing in my OP.
Here is a link to the data I used.
I have attached pictures of everything else below here. If there is anything else you might need from me, please, let me know. Im driving myself crazy trying to figure this out. Im sure its going to be simple, too.
Thanks!
This is my data modelThis is the custom visual that I am using- MFelixSuper User
Hi CEllinger ,
Can you give me a little bit more information about the result you want to achieve please.
When you refer "When I click a date, I want one table to show the responses filtered by visual and other table to show the table I was describing in my OP" whatis exactly the final result you want to achieve?
Based on the tables you submitted can you share a mockup of the result?
Sorry for the late response.
Regards,
MFelix