Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
CEllinger
Helper I
Helper I

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 4
MFelix
Super User
Super 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


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



@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 my data modelThis is the custom visual that I am usingThis is the custom visual that I am using

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


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



@MFelix , dont apologize for a late response. I appreciate the help regardless of the timeline!

 

So, to give you the entire picture:

 

I have a Calendar Slicer Visual that whose measure is

Approved Request = CALCULATE(DISTINCTCOUNT('Full Time Off'[Emp_ID]),'Full Time Off'[Approved]=8)

The Calendar Slicer Visual shows a count of Employees that are off on a selected day.  

Date OffEmployee

4/2/2019Idalia Woolston  
4/2/2019Sofia Sevy  
4/3/2019Idalia Woolston  
4/3/2019Sofia Sevy  
4/4/2019Idalia Woolston  
4/4/2019Sofia Sevy  
4/4/2019Ray Medders  
4/5/2019Idalia Woolston 

 

I want to see all of the Employees that will be off on a selected date. If I drop my Employee's Names into a table (Table 1) on my report, selecting a single day will list all of those Employees counted by the Measure.

e.g. If I click on 4/4/2019, I get 

Idalia Woolston  
Sofia Sevy  
Ray Medders  

 

I want to be able to create a table (Table 2) with the exact same data but that shows all of those Employees NOT identified by the initial measure.

 

Original Employees                  Table 1                            Table 2

Selene Styons  Idalia Woolston  Selene Styons  
Idalia Woolston  Sofia Sevy  Wynona Mailhot  
Wynona Mailhot  Ray Medders  Leana Fleeman  
Leana Fleeman   Nathanael Hough  
Nathanael Hough   Nereida Cardamone  
Sofia Sevy   Nickolas Linquist  
Nereida Cardamone   Danae Pon  
Nickolas Linquist   Mervin Mcgilvray  
Danae Pon   Jessenia Trapp  
Mervin Mcgilvray   Hilton Soule  
Ray Medders   Alesha Griffeth  
Jessenia Trapp   Emil Rachel  
Hilton Soule   Beatriz Kessinger  
Alesha Griffeth   Agnes Gum  
Emil Rachel   Clarita Rockmore  
Beatriz Kessinger   Leslee Lengyel  
Agnes Gum   Mac Napper  
Clarita Rockmore    
Leslee Lengyel    
Mac Napper    

 

Does that make more sense? Also, thank you so much for all of your time already.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.