Hi @a_d - Thanks for confirming.
Here is a good example.
I've also tested it and given some snapshots below if it helps. My data looks something like the below.

You can see above the results (on the right side) an option to create a custom calculation. In the editor, add the formula. SUM(sales) / SUM(orders)

You can then build the visualisation and choose the custom measure you have created.

Hope that helps!
If this answer resolves your question, could you mark it as โAccept as Solutionโ? That helps other users quickly find the correct fix.
Regards,
Ashwin | Delivery Solution Architect @ Databricks
Helping you build and scale the Data Intelligence Platform.
***Opinions are my own***