-2

I have a field containing an int that represents flags

0 = No error 1 = Error 1 2 = Error 2 4 = Error 3 8 = Error 4

so if I have a value of 5, I know it is Error 1 and Error 3

I need to add custom columns for Errors 1-4. In Excel I use

=BITAND(Field, 1) to determine if Error 1 is present

=BITAND(Field, 2) to determine if Error 2 is present

=BITAND(Field, 4) to determine if Error 3 is present

=BITAND(Field, 8) to determine if Error 4 is present

How can I do this with a formula in salesforce report?

Thanks mark

1 Answer 1

0

You can use Case if Logic:

you can see example using this logic, here:

The first part is value of field the second part is the printed value

CASE(MONTH(LastActivityDate),
1, "January",
2, "February",
3, "March", 
4, "April", 
5, "May", 
6, "June",
7, "July",
8, "August",
9, "September",
10, "October",
11, "November",
12, "December",
"None")
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.