1 Reply Latest reply on Sep 24, 2018 12:36 PM by Joe Oppelt

# Cannot combine aggregate and non aggregate functions

I am trying to make this work and cannot figure out how to do it

This is currently a measure and I need to turn it into a dimension so I can add a count by the formula.

this issue is the ISNULL in the first elseif, I need to

if [Completion Date] < [Start Date] Then 0
elseif not isnull([Completion Date]) then
if [BusDaysToCmplt] <= [BusDysCmpltExpected]/1.5 Then 1
elseif [BusDaysToCmplt] > [BusDysCmpltExpected]/1.5
and [BusDaysToCmplt] <= [BusDysCmpltExpected]/1 Then 2
elseif [BusDaysToCmplt] > [BusDysCmpltExpected]/1
and [BusDaysToCmplt] <= [BusDysCmpltExpected]/.8 Then 3
elseif [BusDaysToCmplt] > [BusDysCmpltExpected]/.8 Then 4
end
elseif [BusDaysToday] <= [BusDysCmpltExpected]/1.5 Then 5
elseif [BusDaysToday] > [BusDysCmpltExpected]/1.5
and [BusDaysToday] <= [BusDysCmpltExpected]/1 Then 6
elseif [BusDaysToday] > [BusDysCmpltExpected]/1
and [BusDaysToday] <= [BusDysCmpltExpected]/.8 Then 7
elseif [BusDaysToday] > [BusDysCmpltExpected]/.8 Then 8
end

• ###### 1. Re: Cannot combine aggregate and non aggregate functions

You seems to be mixing a lot of issues in your question.

The agg/non-agg issue is likely that one of those fields in the calc is already an aggregate and the other is not.

If you have an aggregate, it cannot be a dimension.

Posting a workbook here would really help sort through things.