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
Anonymous
Not applicable

Too few arguments were passed to the FILTER function error

Hello,
i have following error for this measure, though i am checking . i cant find the missing ")"!
i want it to return sum of [Einsatzmenge] which have the [Status] of "Beendet"  from table "Bearbeiten - FA-Arbeitsgang":
 
"Too few arguments were passed to the FILTER function. The minimum argument count for the function is 2."
 
M beendetquantity = CALCULATE(
SUM('Bearbeiten - FA-Arbeitsgang'[Einsatzmenge]),FILTER(ALL('Bearbeiten - FA-Arbeitsgang'[Status],'Bearbeiten - FA-Arbeitsgang'[Status]="Beendet")))
1 ACCEPTED SOLUTION
tex628
Community Champion
Community Champion

You haven't closed the ALL statement; FILTER(ALL('Bearbeiten - FA-Arbeitsgang'[Status]),

Br,
Johannes


Connect on LinkedIn

View solution in original post

8 REPLIES 8
Anonymous
Not applicable

I need to change the very last part of this statement to exclude if the date is 1/1/2099. 

Current Staff =
CALCULATE( COUNTROWS( 'HRData' ),
FILTER( VALUES( 'HRData'[Hire_Date] ), 'HRData'[Hire_Date] <= max('Calendar'[Date] ) ),
FILTER( VALUES( 'HRData'[Termination_Date] ), or( 'HRData'[Termination_Date] >= MIN('Calendar'[Date] ), ISBLANK( 'HRData'[Termination_Date] ) ) ) )

 

 

This is my very first time asking a question, so if I'm not following the proper steps please let me know.

tex628
Community Champion
Community Champion

Hi @Anonymous, 

Just to make sure i'm on the right track. You dont want to count employees with termination date 2099/1/1? 

Br, 
J


Connect on LinkedIn
Anonymous
Not applicable

That is correct. I'm sure its a simple matter of syntax, but again I am learning and hoping to learn more in this forum. Thanks

tex628
Community Champion
Community Champion

Try something along the lines of this: 

Current Staff =
CALCULATE( COUNTROWS( 'HRData' ),
FILTER( VALUES( 'HRData'[Hire_Date] ), 'HRData'[Hire_Date] <= max('Calendar'[Date] ) ),
FILTER( VALUES( 'HRData'[Termination_Date] ),
AND( 
'HRData'[Termination_Date] <> DATE(2099,1,1), 
OR( 
'HRData'[Termination_Date] >= MIN('Calendar'[Date] ), 
ISBLANK( 'HRData'[Termination_Date] ) 
) 
) ) )

Connect on LinkedIn
tex628
Community Champion
Community Champion

You haven't closed the ALL statement; FILTER(ALL('Bearbeiten - FA-Arbeitsgang'[Status]),

Br,
Johannes


Connect on LinkedIn

I am also having smilar issue. 

 

can someone please advise?

 

Average New = CALCULATE(AVERAGE('Current & Prior Forecast Combined'[FYE FINAL]), Filter('Current & Prior Forecast Combined'[CL Type]="New"))

hi , @forgetmenot 

 

filter need table argument as a first expression which you not mention you only mention filter expression

 

Average New = CALCULATE(AVERAGE('Current & Prior Forecast Combined'[FYE FINAL]), Filter(Current & Prior Forecast Combined','Current & Prior Forecast Combined'[CL Type]="New"))

 

Thank you 🙂 

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.