Jump to content
bonassus

vex group by range

Recommended Posts

how can i create a group from a range of points based on point number. I can make a group with f@group_s1 = @ptnum<30;

but how do i get 31 though 60? f@group_s2 = @ptnum>30&&<=60; does not work. 

 

Share this post


Link to post
Share on other sites

Your code is correct, you're adding points below 30 into f@group_s1, and points greater than 30 & lower than 60 (so 31 to 60) are added to f@group_s2.

Although in this case the point 30 is neither in @group_s1 nor @group_s2, because both conditions are only targeting numbers lower than 30 and higher than 30. To fix that just add the "=" sign to either the "@ptnum <= 30" for @group_s1 or "@ptnum >= 30" for @group_s2.

image.thumb.png.f7c427bd171b26a842e10afda4515e2b.png

Share this post


Link to post
Share on other sites
14 hours ago, Ziyad said:

Your code is correct, you're adding points below 30 into f@group_s1, and points greater than 30 & lower than 60 (so 31 to 60) are added to f@group_s2.

Although in this case the point 30 is neither in @group_s1 nor @group_s2, because both conditions are only targeting numbers lower than 30 and higher than 30. To fix that just add the "=" sign to either the "@ptnum <= 30" for @group_s1 or "@ptnum >= 30" for @group_s2.

image.thumb.png.f7c427bd171b26a842e10afda4515e2b.png

Thanks for the correction. I left out the @ptnum in the second half of my expression. Seems kind of obvious now. Much appreciated.

 

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×