Filtering column using conditions

Hi everyone,

i’m actually facing issues with my glide app.

I couldn’t figured out how to filter a number column by 2 conditions (user’s ID and Checkbox value).

I need it in order to configure my bill recap in my user’s shopping cart.

I have a column “total”, in which is calculated the product price*quantity, however i’d like to calculate the sub-total per-user and with the checkbox value equals to false.

In long story short, i have a sheet ‘orders’, every product that user put in their shopping cart create a new row in this sheet. In order to separate current user’s order and past user’s order, i made a column “statut” where there is an checkbox (boolean value) to indicate if it is an actual order or a passed order.

Even if i made the email column a row owner, i couldn’t figured out how to calculate the sum (like using a rollup column) by filtering with these 2 conditions (email and statut).

I would like to know also if Glide couldn’t provide me any tools in order to accomplish this, will i be able to do my operation in google sheet directly, using functions and eventually SQL to filter with parameters ?

You can make a template column joining the user email and the status column. It will come back in a form like “a@gmail.com FALSE”.

Then make a relation matching that template column with itself, return multiple matches. Then all “a@gmail.com FALSE” orders will be returned.

From there, make a rollup to calculate the sum using the relation.

Thanks @ThinhDinh it almost works, however it blocks with the rollup column, i can’t validate the column.

I think that’s linked to the row id column i have create previously, indeed in my relation column the data reported is row id.

I’m gonna looking for ways to manage this and delete row id, and i then i think it’s gonna work.

Thanks a lot !

i will update the post if i am facing new issues with this.

Can you specify more about how it blocks the rollup column? Some screenshots might help for me to know how you’re setting it.

Does anyone know how i could delete the row id ? @ThinhDinh do you think that my relation column report the row id for other reason ?

Ah if you’re mentioning that, the relation returns the row ID solely because it’s the first column in your data.

The point of it is Glide’s telling you “We have found some matches for your relation column and we’re showing it by the first column with data by default”.

If you want to actually see the information you want to bring back via a relation, use a lookup.

It doesn’t work with a lookup column, it only shows the data of the total per product column. @ThinhDinh

Maybe there is another ways to manage this by using the row id column ? @Jeff_Hager

I didn’t mean you should use lookup for this, just an explanation on how relations and lookups work together, and why the relation is returning the row ID.

Are you making a relation based on the template column and then rollup using that column? What does it return?

2 Likes

Yes i follow your instruction, i made a template column which display the value Email and statut.

@ThinhDinh

Then i made the relation column between template itself. Capture_reltion

I also move the total per product column at the beginning of my sheet, so the relation column display price instead of row id. @ThinhDinh

Yeah but what does the rollup column return? Have you created a rollup column?

When i try to create the rollup column i can’t clique on “Done”. Capture_rollup

Are all the columns that are combined to make your “Total à payer” column contain any text?

No both of the columns that make the “total à payer” column are number column. @ThinhDinh

Any chance it falls into one of the things mentioned here.

I don’t know if i renamed it, i can’t remember. Do you think that i need to delete my relation column and then recreate it ? @ThinhDinh

Yeah can you please try that, did you rename it at any point?

2 Likes