Workaround to mixing aggregate and non-aggregate formulae

Workaround to mixing aggregate and non-aggregate formulae

I made an aggregate formula that works but then realised I need to take out VAT from personal contracts.
The code for the formula that works is as follows:- sum_if("Vehicle Orders"."Status" = 'Delivery Arranged & Confirmed With Customer' OR "Vehicle Orders"."Status" = 'Finance Documents Accepted' OR "Vehicle Orders"."Status" = 'Finance Documents Pending' OR "Vehicle Orders"."Status" = 'Finance Documents Received' OR "Vehicle Orders"."Status" = 'Invoiced' OR "Vehicle Orders"."Status" = 'MIGRATED ORDER' OR "Vehicle Orders"."Status" = 'New Order' OR "Vehicle Orders"."Status" = 'Vehicle Delivered' OR "Vehicle Orders"."Status" = 'Vehicle In Production' OR "Vehicle Orders"."Status" = 'Vehicle In Transit To Dealership' OR "Vehicle Orders"."Status" = 'Vehicle Live' OR "Vehicle Orders"."Status" = 'Vehicle Order Confirmed With Dealer' OR "Vehicle Orders"."Status" = 'Vehicle Order Sent to Dealer' OR "Vehicle Orders"."Status" = 'Vehicle Ordered',"Vehicle Orders"."Sales Commission",0)

I then tried to put it in an IF statement that says when the contract type is personal, divide the commission by 1.2 to take the VAT off, but it says "Mixing of aggregate functions and non-aggregate columns is not allowed".

I've been trying to think of workarounds but I'm a little inexperienced coding. Any help would be appreciated.

Thanks,

James

      • Sticky Posts

      • Announcing Zoho Analytics 6.0 Beta!

        We are delighted to open up the next major version, Zoho Analytics 6.0 Beta! The new version comes packed with a wide range of functionalities for all persona, namely business users, data analysts, data engineers, and data scientists. Zoho Analytics team
      • What's New in Zoho Analytics - August 2024

        Hello Users! We are back with the latest updates and enhancements made to Zoho Analytics. Keep reading to learn more about them. Connect to the data hosted in the cloud without allow-listing the IP addresses Utilize Zoho Databridge to connect to the data
      • 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