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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
DenisBerisha
New Member

Calculate and filter

Hi, 

 

Im trying to use the following DAX functions but I get an error.

 

Expenses = 
Calculate (
      [Transaction Amount], 
      FILTER ( transactions[Type] = "debit" ),

      transactions[Category] <> "transfer",

      transactions[Category] <> "Credit Card Payment"

)

ERROR: Too few arguments were passed to the FILTER function. The minimum argument count for the function is 2. 

 

Please help !

 

Thanks in advance

2 REPLIES 2
JohnShepherdAPD
Helper II
Helper II

Hi the first argument of the Filter function should be a table, but its also not needed if the measure you calculate is the table you want to filter, try this:

Expenses =
Calculate (
    SUM([Transaction Amount]),
    transactions[Type] = "debit" && transactions[Category] NOT( IN { "transfer","Credit Card Payment",""})
)
joaoribeiro
Impactful Individual
Impactful Individual

Hello,

 

In order to use the FILTER function you must add the table which you want to filter as first argument, as shown below. Please notice that, for boolean filters (filters which the result is not a table), it's more performanic to not use the FILTER function and use the filter directly in the CALCULATE function, as you did for the other filters.

Sintax:
FILTER(<table>,<filter>)

Example:

Expenses = 
Calculate (
      [Transaction Amount], 
      FILTER ( transactions, transactions[Type] = "debit" ),

      transactions[Category] <> "transfer",

      transactions[Category] <> "Credit Card Payment"

)



Please find more details in the following link:
https://learn.microsoft.com/en-us/dax/filter-function-dax

Hope it helps!

Regards,
Joao

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.