How do I use product code in a report formula? - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Bobby JackBobby Jack 

How do I use product code in a report formula?

I'm trying to display a report that gives me SOMETHING like the following:

Account Name | Product Name | Employees | Tariff Rate

I've created an 'Opportunities with Products' report and am now trying to define the formula for Tariff Rate, which is proving problematic:

a) Does this have to be a summary/matrix report with a grouping? What I really want is a tabular report, but that doesn't appear to support formulas. It looks as if I have to create a meaningless grouping (e.g. Account Name) to use a forumla: this makes the report much harder to read than a straightforward table.

b) I cannot work out how to access the product code in my formula. No matter what I try (Product Code, Product_Code, Product.Code, Product.ProductCode, ...) I always get this error:

"Error: Invalid custom summary formula definition: Field [whatever I've tried] does not exist. Check spelling."

c) Is this just not possible / advised? Would I be better off adding a custom field to ... Opportunities?
Bobby JackBobby Jack
Right, I've skirted around the issue by adding the value I was going to generate via the forumla, as a custom field on the Product. This now allows me to actually get the value I'm after, but doesn't solve a). This is really an issue, because the resulting report is much harder to read than it should be - a summary report just isn't appropriate in this case.

If I could add a custom formula field to the Opportunity, I could probably fix that, but I can't find out how to reference an Account field and a Product field from such a custom field - is that possible?
Steve MolisSteve Molis
Can you post ascreenshot of the formula you're using and what you would like the report result to look like?
Bobby JackBobby Jack
Hi Steve, here's a screenshot of the formula:

User-added image

I want the output to be pretty much what I've outlined in the question, i.e. one row per opportunity, in a tabular layout (not summary or matrix) with a column for 'tariff rate' that is the product of two other columns.