Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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())

1 Solution

Accepted Solutions
vgutkovsky
Master II
Master II

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,

Vlad

View solution in original post

5 Replies
Not applicable
Author

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

Regards,

Kiran.

Anonymous
Not applicable
Author

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])))

Anonymous
Not applicable
Author

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] )))

vgutkovsky
Master II
Master II

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,

Vlad

Anonymous
Not applicable
Author

Thank you so very much!