Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Sheetal
Contributor II
Contributor II

Greater than or not equal to syntax

Hello

I have a table with the following field. Both the fields are numeric.

Sessionid             | Paid Registrations by Attendee
12345                                              100
12345                                              200
12345                                              300
12345                                              100

22345                                                50
22345                                                20
22345                                                30
22345                                                100

22345                                                  0
22345                                                  0
22345                                                  0
22345                                                  0

I have a bar chart with session id as a dimension and Sum([Paid Registrations by Attendee]) as a measure. I am only looking to display Sum([Paid Registrations by Attendee]) if the value is greater than 0 or not equal to 0.
Is there a way to do this?

Thanks in advance.

Sheetal.

Labels (2)
7 Replies
sunny_talwar

So, you do you want to only show the expression is greater than 0 or do you also want to show it when it is less than 0?

Uday_Pasupuleti
Partner - Creator III
Partner - Creator III

Set the Limitation to exact value and select ">0" under dimension in edit mode.

Sheetal
Contributor II
Contributor II
Author

Hi Sunny

I am looking to display only if the value is greater than zero but I believe not equal to zero will also work.

Basically I want to exclude all sessions where we have received zero dollars from the bar graph , so  display Sum([Paid Registrations by Attendee]) on the Y-axis only if Sum([Paid Registrations by Attendee]) > 0.  Any idea how I can do this? Thanks for your help.

sunny_talwar

Did you already try to uncheck 'Include Zero values' under Add-Ons -> Data handling? If not, give that a shot

treysmithdev
Partner Ambassador
Partner Ambassador

You can do this two ways. 

1. Chart setting:

 

A91187E9-4793-4467-AB89-B6851314A68C.jpgC229A57E-4EC2-41DC-82E7-F229E95E50B9.jpgF5BFDCAE-3BCF-461B-B071-269ADD62AA9B.jpg

 

2. Set Analysis

If you need the aggregate: 

 

Sum({<Paid_Registrations_by_Attendee={">0"}>} Paid_Registrations_by_Attendee)

 

If just the field value: 

Sum({<Sessionid={"=Sum(Paid_Registrations_by_Attendee)>0"}>} Paid_Registrations_by_Attendee)

 

Blog: WhereClause   Twitter: @treysmithdev
tgriffin
Contributor II
Contributor II

That resolved it for me...

Sum({<Sessionid={'=Sum([Paid Registrations by Attendee])>0'}>} [Paid Registrations by Attendee])

Sheetal
Contributor II
Contributor II
Author

Thank you. That worked.