Simple MTD forecast in KPI Widget

Simple MTD forecast in KPI Widget

I want to display, in a KPI widget, a simple forecast of the current month of sales. To get this forecasted number, I need to divide the current MTD sales by the number of business days elapsed in the current month, then multiply that by the total number of business days in the current month to get a very rough forecast of what the month-end total will be. I want this total number to be displayed in the widget.

So far I've created a couple of formula columns:
- Number of business days elapsed in the current month called "curr_bus_day"
  business_days(start_day(month,current_date()),current_date())
- Number of total business days in the current month called "total_bus_day"
  business_days(start_day(month,current_date()),end_day(month,current_date()))

And an aggregate formula to get the current MTD sales:
  mtd(sum("my_table"."line_item_total"),"my_table"."date")

But I'm not sure where to go from here and how to fit these pieces together. I tried to calculate it all in a new formula column but I can't use aggregate formulas in a formula column. I tried to calculate it in an aggregate formula with the following but this aggregate formula doesn't appear as an option in the "Data Column" dropdown in the widget editor for some reason:
  (mtd(sum("my_table"."line_item_total"),"my_table"."date")/first_value(sum("my_table"."curr_bus_day")))*first_value(sum("my_table"."total_bus_days"))

This is dividing the MTD sales by the first value of the curr_bus_day formula column which is the number of business days elapsed, multiplying that by the first value of the total_bus_days formula column. But this seems like the wrong way to do it.

Any suggestion or tips?




                            Zoho Desk Resources

                            • Desk Community Learning Series


                            • Digest


                            • Functions


                            • Meetups


                            • Kbase


                            • Resources


                            • Glossary


                            • Desk Marketplace


                            • MVP Corner


                            • Word of the Day



                                Zoho Marketing Automation
                                        • Sticky Posts

                                        • We are coming to your city! Zoho Analytics Community Meetup

                                          Hello, business leaders and data enthusiasts! We are delighted to announce that registrations are now open for the ZUG meetups, and we can't wait for you to be a part of them. Our in-house analytics experts are geared up to lead discussions on constructing
                                        • Zoho Analytics: 2021 Look Back

                                          As we start a new year in 2022, here's some of our top moments from 2021. Zoho Analytics in 2021
                                        • [Customer Talk] PREMO Group's Analyst Interview at Zoho Day 2022

                                          Premo Group, a 50 year old Spanish Manufacturing Company, has been our long-standing customer with #ZohoAnalytics. They've been using our platform for their end-to-end, unified business analytics solution.  Hear more from Claudio Cabeza, Director at PREMO
                                        • Announcing Zoho Analytics 5.0 -- A Modern Self-service BI & Analytics Platform

                                          We are extremely delighted to unveil Zoho Analytics 5.0 - A Modern Self-service BI and Analytics platform to the public. Experience analytics like never before with the following new capabilities and enhancements: Comprehensive AI-Powered Data Preparation
                                        • Zoho Analytics | Quarterly Newsletter | Q2 2022

                                          Hello Everyone! I hope all of you are safe and well! Zoho Analytics - Q2 Quarterly Newsletter is out now! Check out the newsletter (attachment) to know all about our new features, recognitions, webinars, blogs, and many more exciting things.  Do let us


                                        Manage your brands on social media



                                              Zoho TeamInbox Resources

                                                Zoho DataPrep Resources



                                                  Zoho CRM Plus Resources

                                                    Zoho Books Resources


                                                      Zoho Subscriptions Resources

                                                        Zoho Projects Resources


                                                          Zoho Sprints Resources


                                                            Qntrl Resources


                                                              Zoho Creator Resources


                                                                Zoho WorkDrive Resources



                                                                  Zoho Campaigns Resources

                                                                    Zoho CRM Resources

                                                                    • CRM Community Learning Series

                                                                      CRM Community Learning Series


                                                                    • Tips

                                                                      Tips

                                                                    • Functions

                                                                      Functions

                                                                    • Meetups

                                                                      Meetups

                                                                    • Kbase

                                                                      Kbase

                                                                    • Resources

                                                                      Resources

                                                                    • Digest

                                                                      Digest

                                                                    • CRM Marketplace

                                                                      CRM Marketplace

                                                                    • MVP Corner

                                                                      MVP Corner

                                                                    





                                                                    




                                                                        Design. Discuss. Deliver.

                                                                        Create visually engaging stories with Zoho Show.

                                                                        Get Started Now