user7577311
user7577311

Reputation:

DAX FILTER function with multiple criteria

I have a DAX statement I run inside SSMS.

my original statement is:

evaluate(filter('rptLoan', [RemainingDays] <= 10))

and it works fine. I want to add another criteria as below

evaluate(filter('rptLoan', [RemainingDays] <= 10 and [CloseDt] <> "2017-01-31"))

but it is not working and I get below error

Query (1, 47) Operator or expression 'AND' is not supported in this context.

Please advise. Thank you.

Upvotes: 7

Views: 65455

Answers (1)

FLICKER
FLICKER

Reputation: 6683

It's simple. You can not use AND. You need to use && instead.

You also need to convert the string date to date type using DATEVALUE function

evaluate(filter('rptLoan', [RemainingDays] <= 10 && [CloseDt] <> datevalue("2017-01-31")))

Upvotes: 12

Related Questions