How to add a formula in Lightning Report Builder

For a while now I have been using the dropdown on the Report Builder to switch the builder into Classic mode anytime I wanted to be able to add a formula to a report. Well, lo and behold, Salesforce did add a formula function to the Lightning Report Builder, and it is quite fancy to boot.

So if you are on a report, click into the Edit section. From here you go to the Columns section and look for the little drop down.
2019-04-20_09-59-57

You see here that there are three options, we are looking for the Summary Formula one. (Although, Bucket Column is also pretty new!)
2019-04-20_10-00-33

When you click the Add Summary Formula, you get a small box that gives you the ability to just go forth and write your formula and give the column a name.

2019-04-20_10-01-32

Now I don’t know about you, but I don’t trust my syntax as far as I can throw it, so you may be wondering where the builder is… You need to click the Switch to Full Editor.

2019-04-20_10-02-52

Here is where the fancy lives:

2019-04-20_10-03-15

On the left-hand side, you can see all of the fields that you have available to use. The next tab over gives you all of the different formulas. When you find what you are looking for you just click insert and it adds it to the formula section.

If you are interested in typing it out, it will actually start to auto-fill for you:

2019-04-20_10-05-42

The tab labeled Format is where you can decide the type of field it will be, as well as, the summary line setup.

2019-04-20_10-06-39

There you have it folks, a wonderfully updated formula builder for the newish Lightning Report Builder.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s