Forum Discussion

adoalan's avatar
adoalan
Helper III
3 years ago

Help with DAX formula

Hi 

 

I need help with formula

 

I m getting this error:

 

A function 'PLACEHOLDER' has been used in a True/False expression that is used as a table filter expression. This is not allowed.

 

4 Replies

    • adoalan's avatar
      adoalan
      Helper III

      amitchandak  see below

      No Previous GAD =
      VAR StartDate = CALCULATE(MIN('Gift Aid Declarations'[Created On]), ALLSELECTED('Gift Aid Declarations'))

      VAR CurrGAD =
      FILTER (
          DISTINCT  (
              SELECTCOLUMNS (
              'Gift Aid Declarations', "Supporter ID", 'Gift Aid Declarations'[Supporter ID])
              ),
          NOT (ISBLANK([Supporter ID]))
      )  
      VAR PrevGAD = CALCULATETABLE(
          VALUES('Gift Aid Declarations'[Supporter ID]),
          'Gift Aid Declarations'[First GAD Created On] < StartDate &&
          'Gift Aid Declarations'[Supporter ID]<> BLANK()
      )

      RETURN

      IF(
          COUNTROWS(EXCEPT(CurrGAD, PrevGAD)) = BLANK(),
          0,
          COUNTROWS(EXCEPT(CurrGAD, PrevGAD))
      )
  • And the error is this

     

    A function 'PLACEHOLDER' has been used in a True/False expression that is used as a table filter expression. This is not allowed.