+ Start a Discussion
Paul GrundyPaul Grundy 

Picklist - Custom Field: CASE Formula


Hi there,

I'm hoping someone might be able to help me!

I want to create a custom formula field, which brings back a specific result based on what's been selected from a custom picklist that I've created. Below are picklist values against the results that I need returning.

CPM = 1,000
CPC = 1
CPL = 1
CPA = 1

The custom field that I've created is called Pricing_Metric__c

Any help/guidence would be awesome. I've tried CASE, IF... and the only result I seem to be achieving is a loss of hair, which I'm gradually pulling out!

Thanks,

Paul
Best Answer chosen by Paul Grundy
Mohan_ShanmugamMohan_Shanmugam
Hi Paul,

Create a custom formula field with data type as Number and use the below Case function to fetch the result as you need.

CASE( Pricing__c , 
"CPM",1000, 
"CPC",1, 
"CPL",1, 
"CPA",1, 
0)

It worked for me, let me know if you still have issue.

Thanks,
Mohan
 

All Answers

Mohan_ShanmugamMohan_Shanmugam
Hi Paul,

Create a custom formula field with data type as Number and use the below Case function to fetch the result as you need.

CASE( Pricing__c , 
"CPM",1000, 
"CPC",1, 
"CPL",1, 
"CPA",1, 
0)

It worked for me, let me know if you still have issue.

Thanks,
Mohan
 
This was selected as the best answer
Paul GrundyPaul Grundy
Hey Mohan,

You are my newest hero! I wish I posted my question this morning! Argggggggg!

Thank you so much – completely solved my problem!! Brilliant!

Thanks,

Paul