Skip to main content

I'm getting the all-too-common error message saying that I'm mixing aggregates and non-aggregates in the calculation below. I've tried the solutions suggested here with no success:

 

https://kb.tableau.com/articles/issue/error-cannot-mix-aggregate-and-non-aggregate-arguments-with-this-function-when-creating-a-calculated-field

 

Here's the calc:

 

IF [Date- Fiscal Year (js)]<[Fiscal Year Start Date Current Year (js)] THEN 0

ELSEIF [Date- Fiscal Year (js)]>(TODAY()-1) THEN 0

ELSE COUNTD([Donor Id])

END

 

Another question about mixing aggregates and non-aggregates 

I've also attached the workbook. Thanks, in advance, to anyone who can help me with this!

3 risposte
  1. 20 feb 2021, 19:28

    Hi Amelia,

     

    You may want to re-write your calc like this:

    ZN( COUNTD(

    IF [Date- Fiscal Year (js)]<[Fiscal Year Start Date Current Year (js)]

    THEN Null

    ELSEIF [Date- Fiscal Year (js)]>(TODAY()-1)

    THEN Null

    ELSE [Donor Id]

    END

    ) )

    Yours,

    Yuri

0/9000