Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

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")))
  • You haven't closed the ALL statement; FILTER(ALL('Bearbeiten - FA-Arbeitsgang'[Status]),

    Br,
    Johannes

8 Replies

  • tex628's avatar
    tex628
    Icon for Community Champion rankCommunity Champion

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

    Br,
    Johannes

    • forgetmenot's avatar
      forgetmenot
      Icon for Helper I rankHelper I

      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"))
      • Dangar332's avatar
        Dangar332
        Icon for Resident Rockstar rankResident Rockstar

        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"))

         

  • Anonymous's avatar
    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's avatar
      tex628
      Icon for Community Champion rankCommunity 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

      • Anonymous's avatar
        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