I was banging my head trying to figure this out and voila ! If you have created a Bucket Field in Salesforce Report and want to reference that Bucket Field in a Formula Field created at the report level (not at the object level), ย here is how you can do it.
First of all if you want to refer a field in the Formula field, you need to know the API Name (a.k.a Developer Name). Now the problem is when you create a Bucket Field, all you see is the Bucket Field Name and not the API Name.
(Click on the images below to view the image in its original size)
So to retrieve the API Name for Bucket Field, open the report definition in IDE (eclipse) by double clicking on the report name in left sidebar. Bucket Fields have the API name in the format of BucketField_<9999999> as shown below. In this example the API Name of Bucket Field is BucketField_1023495
This API Name then can be used in the Formula Field Definition within a report as shown below
How’s that ?
February 27, 2020 @ 1:12 AM
You can also get the API Name from the HTML of the page.
February 27, 2020 @ 12:49 PM
Thanks for the tip Chelsea.
November 22, 2017 @ 2:21 AM
Is there a means to create a formula which returns a sum for only a subset of the buckets at the grand total location?
Tricks all Salesforce Admins Need part 4 of 7 โ The Power of the Bucket #ForceFriday | Salesforce Quest
February 12, 2016 @ 9:16 PM
[…] How to use a Bucket field in a Formula field […]
January 19, 2016 @ 4:24 PM
Hi Ash – Could you help me with the syntax for the following formula to calculate the Ratio of columns Won/New Opps. I created a bucket field with two values: Won, New which show up as 2 columns on my report. Need help with using column values and not row values.
Bucket Field Won Opps | Bucket Field New Opps | Ratio of Won/New
1 5 .20
Need help with formula syntax below to give me the results above. Thank you so very much for assistance.
RowCount/PARENTGROUPVAL(RowCount, ROW_GRAND_SUMMARY, BucketField_25017921)
November 21, 2015 @ 3:26 AM
How do I follow this step? “So to retrieve the API Name for Bucket Field, open the report definition in IDE (eclipse) “
January 20, 2015 @ 4:41 AM
How do you create a formula based on a specific bucket value though?
I want to be able to show if Bucket value = X display the amount of 10000
October 15, 2014 @ 4:39 AM
Hi Ashis, I can 1up that. If there’s a single bucket field, it will show within the page source of the bucket distribution setup. So no need to fire up the IDE… ugh. Just typing ‘Eclipse’ gives me the creeps. ๐
November 26, 2014 @ 6:21 AM
Thanks for the tip Rafel !
June 23, 2014 @ 6:00 PM
Not working. getting field does not exist.