5 Replies Latest reply: Oct 4, 2011 12:09 PM by Lynn Nasadoski

# Conditional row display in straight table

I am very new, so this is probably an easy thing that I just can't do as a beginner.

I have a straight table that is counting degrees for a given student.

I only want to display the rows where degree-count is greater than 1.

I tried the following 'if', but it does not omit the counts that = 1.

Any ideas on how to apply a condition to this expression?

if(count([Degree Counter] > 1),count([Degree Counter]), null())

• ###### Re: Conditional row display in straight table

Try this sum(if(aggr(count([Degree Counter],student)>1,count([Degree Counter]))

Regards,

Kiran.

• ###### Re: Conditional row display in straight table

I modified your suggestion by replacing <student> with <Name> assuming that was to be the unique 'group by' field.

I had to add two end-parenthesis and I was not clear on where to add them.  Now I do not get any rows in my table.

Do you see any issue with what I've done?

sum(if(aggr(count([Degree Counter]),Name) >1,count([Degree Counter])))

• ###### Re: Conditional row display in straight table

I modified your suggestion by replacing <student> with <Name> assuming that was to be the unique 'group by' field.

I had to add two end-parenthesis and I was not clear on where to add them.  Now I do not get any rows in my table.

Do you see any issue with what I've done?

sum(if(aggr(count( [Degree Counter] ),Name) >1,count( [Degree Counter] )))

• ###### Conditional row display in straight table

You can do this without aggr, which will be much lighter in terms of memory and CPU consumption: sum({<Name={"=sum([Degree Counter])>1"}>}[Degree Counter])

Note that this assumes that "Degree Counter" is a flag that can be summed, and is joined correctly to the rest of your data model. If you post a reduced example app, I can check it for you in case this produces unexpected results.

Regards,