Perform calculation on two lists of aggregated numbers

Hi, I am trying to do calculation on two lists of aggregated numbers and create a chart based off of that.

For example, I would like to have number of rows under one condition - number of rows under another condition by date.

It’s similar to this SQL query below:

Select
Count(a) - Count(b)
From Table
Group by date

(a and b would be a case when statement which could be easily done by a search filter.)

The group by operator in bubble doesn’t seem to support something like this. Does anyone know how to do this? Any help would be amazing.

Put the dynamic expressions for your search filters into either an input element or group element and set type of content to number…then use the input or group values in your expression to show the count(a) - count(b)

Could you elaborate a bit more?

To clarify, what I want is a calculation performed on two lists of numbers. Each list is generated by an expression like this with a filter applied to search. This example is grouped by hour so each value in the list is the row count by hour.
image

So essentially what I want would be something like [1, 4, 5] - [2, 1, 3]. The returned list [-1. 3, 2] will be used for creating a bar chart.

Thanks for clarifying, I was unaware of need to create a list…you should check out list shifter plugin functions, which were put into a paid plugin. Search forum for list shifter and you should be able to find name of new plugin the functions are in.

This topic was automatically closed after 70 days. New replies are no longer allowed.