if query condition

Good morning I ask you for help ...
I have this query in an action of a bot, the test is ok but
on the table it always writes TODAY()-1 always enters the first condition.
Because?

IF(
  ISBLANK(
    ANY(
      SELECT(
        APPUNTAMENTI AUTO[DATAAPPUNTAMENTO] ,
       [IDCANE] = [_THISROW].[IDCANE]
     )
  )
), TODAY() - 1,
  ANY(
    SELECT(
      APPUNTAMENTI AUTO[DATAAPPUNTAMENTO] ,
        [IDCANE] = [_THISROW].[IDCANE]
    )
  ) - 1
)

thank you

 

0 5 170
5 REPLIES 5
Top Labels in this Space