## Excel FISHER Function in Apex Salesforce

In this post we will see how we can write Excel FISHER function in Apex Salesforce. Before going to the apex code lets first see some details about FISHER function. This function returns the fisher transformation at x.

Syntax of FISHER function is as follows in Excel

• FISHER(x)
• WHERE x is required
• Value of x should be greater than -1 and less than 1 i.e -1 < x < 1.

Now see the code for Excel FISHER function in Apex Salesforce.

Above code can be added in any apex class, after adding this code we can use it as per our requirement. Lets test it from developer console. Go to developer console and in Execute anonymous window paste the below code.

After executing above code snippet you will get below output.

Hope this code will save your time, if you need to implement FISHER function in salesforce.

Happy Coding 🙂
799 The Coder

See some more post for Excel function in Apex

## Excel CORREL function in Apex Salesforce

Today we will see salesforce apex equivalent code for Excel CORREL function. Excel CORREL function in Apex Salesforce can be used if we need to perform same calculation on salesforce data as excel CORREL  function.

Syntax of CORREL function is as follows in Excel

• CORREL(array1, array2)
• WHERE array1 and array2 both are Required.
• We must ensure that array1 and array2 are same in size.

See the code below, code has static methods written you can put them in your util class/helper class.

Once we have above methods in our code, we can use it 🙂 , Now lets test the method from developer console, open developer console and write below code.

When you execute the above code, you will get the output as follows. correlationCoeffient = 0.997054485501581486225379535213640

See more Excel functions in apex salesforce code

Happy Coding !

799 The Coder

## Excel INTERCEPT function in Apex Salesforce

Hello awesome Developers!!! This post will save your time if you are going to implement Excel INTERCEPT function in apex salesforce. In my previous post of excel function (Excel LINEST function in Apex Salesforce), we coded for LINEST function of excel.

Before we jump to code, lets have a quick view of INTERCEPT function.

Syntax of Intercept function is as follows in Excel

INTERCEPT(known_y’s, known_x’s)

WHERE Known_y’s  and Known_x’s  both are Required.

We must ensure that Known_y’s and Known_x’s size is same.

The above code snippet is a static method, you can put it any helper/utility class in salesforce.  See below a demo call to this method from developer console.

The output of the above code snippet from developer console will be below

INTERCEPT = 0.0483870967741935483870967741935484

Use it and save your time, in your saved time do some other creative coding 🙂 !!!

## Excel LINEST function in Apex Salesforce

As a developer we sometime need to implement excel function in code for meeting client’s requirement. Here I will share code for Excel LINEST function in apex. You can check LINEST function/method of excel here.

See below code method, you can use it in your apex class.

It will save your time if you need to write it from scratch in apex. I am open for your valuable feedback.

Happy Coding 🙂
{"ft_lang_label":"__label__en","ft_lang_prob":0.6946506,"math_prob":0.8371476,"size":1451,"snap":"2023-14-2023-23","text_gpt3_token_len":399,"char_repetition_ratio":0.13959917,"word_repetition_ratio":0.02189781,"special_character_ratio":0.29290146,"punctuation_ratio":0.10915493,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9501836,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-05-29T16:48:28Z\",\"WARC-Record-ID\":\"<urn:uuid:415a42dc-02b9-4b5c-81df-5131771596ee>\",\"Content-Length\":\"151712\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:a467e59a-0ed9-4ed3-8271-cfa49fb7e785>\",\"WARC-Concurrent-To\":\"<urn:uuid:067451b6-7284-4adc-a64f-f83d1b409300>\",\"WARC-IP-Address\":\"166.62.28.127\",\"WARC-Target-URI\":\"https://www.799thecoder.com/tag/excel-function-in-apex/\",\"WARC-Payload-Digest\":\"sha1:XCNMTWL6UJN2HYN7HDFVOFMHRCY7B26K\",\"WARC-Block-Digest\":\"sha1:SQ5A3WEZH454MBP5YIQLQKFX6BWKR5SB\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-23/CC-MAIN-2023-23_segments_1685224644867.89_warc_CC-MAIN-20230529141542-20230529171542-00439.warc.gz\"}"}