help with an expression

zz 21 Reputation points

Hi all

Good afternoon

I have an excel formula and i need help converting it to an ssrs expression any help is greatly appreciated


Lets just assume that the field name in ssrs for C26 is called "A" G26 "B" J26 "C" F26 "D", H26 "E"


SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,850 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Joyzhao-MSFT 15,571 Reputation points

    Hi @zz ,
    The linest excel function is just linear regression. It's (still) not available in sql server.

    For the Decision Functions
    Commonly used conditional functions in SSRS are IIF, Switch and Choose.

    =IIf ( <condition> , <return value if true> , <return value if flase> )  
    =Switch(<condition>, <return value if true>, <next condition>, <return value if true>, ...)  

    For the length issue:

    = LEN(Fields!YourField.Value)  


    = Fields!YourField.Value.Length  

    If your field is not a string, try converting first by using the Cstr function:

    = LEN( Cstr(Fields!YourField.Value) )  
    = Cstr(Fields!YourField.Value).Length  

    For more information. please refer to: Expression examples in paginated reports (Report Builder).
    The use of functions usually depends on your report design and data. So please share screenshots of your designs if possible. You could also try the functions I provided above.
    Best Regards,

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments