7

I have a DAX statement and I run it inside SSMS.

my original statement is:

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

and it works file. 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.

1 Answers1

12

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")))
FLICKER
  • 6,439
  • 4
  • 45
  • 75