I’ve searched the forum and haven’t been able to solve the problem yet.
For context, I’m making a CRM and in the ‘Dashboard’ page, I need to add the ‘Rolling Pipeline’ I.e., total Pipeline (solved), and the Pipeline per-quarter from a repeating group.
Data structure:
Prospect
Close date
Amount (deal size)
The calculation needs to consider the total amount of pipeline for this current quarter.
Hi, I appreciate the response. I’ve set the ‘close dates’ for the ‘Accounts’ at different dates ranging from 2024 - 2027. The sum is still calculating the Total Amounts for Accounts, rather than Amounts within the quarter
If you want to account for Prospects whose close date ranges from now to 3 months in the future, why do you need the merge operation? What’s in the result of the second Prospect search?
Hi, I have no idea why I put merge in there. It’s a combination of different thread posts/tutorials telling me how to do it. Any idea of the operations I’d need to do this? Is it more simple than I’m making it to be? (I’m 3 months into Bubble, so fairly new)
I don’t know what Prospects you are getting in the second search, but you only need those retrieved by the first search.
Do the :sum operation over the amount of the Prospects that are retrieved by the first search and you’ll have it.
Disclaimer
The constraints in the search operation might be problematic though, since I can’t recall whether they conform an AND or OR operation. If it’s an AND you are good, if it’s an OR, you’ll indeed need two searches, each one with a different constraint, bound with an intersect operator
Not sure what this ‘£365,000’ is being calculated from to be honest.. I’m trying to calculate between set periods (quarter) I.e., from January - March, April - June, July - September, Oct-December.
Is there a way I can do this? I’m really struggling here lol
It’s all about how you define the Search for Prospects expression and its constraints.
If you are looking for natural quarters, as you stated, the current constraint won’t give the result you look for. As per your last screenshot, you are calculating the aggregated Prospect's amount for Prospects whose close date is later than 3 months in the future.
You should define constraints such as close date ≥ (Jan 1st 2025) AND close date ≤ (Mar 31st 2025)
You can have a look at this topic to learn how to group search results per quarter.
That makes sense, thank you very much for your help. Ademiguel! One quick question before I stop pestering you. Where do I type in (Jan 1st 2025) on this section? Or, is there somewhere I can select that date?
I made some progress with the :groupby function and have selected Q1 as the first example. I can’t however, link this new date interval to the sum of ‘deal-sizes’ relating to that quarter?
You’ll have to define 4 different expressions for the Text value, one per quarter, and place them in conditionals in the Text’s conditionals tab. Just place conditions to make use of one of the 4 expressions, to discern whart quarter we are in currently, based on the Current time/date.
Got it, thank you. When I add the 4 quarters, I can no longer set an ‘end date’ for each quarter? Is this where I need to set the ‘End date’ to the end of the year as the ‘start date’ + 3 month interval already calculates per-quarters end date?