Learn more about SQL Server tools

mssqltips logo
 

Tutorials          DBA          Dev          BI          Career          Categories          Webcasts          Whitepapers          Today's Tip          Join

Tutorials      DBA      Dev      BI      Categories      Webcasts

DBA    Dev    BI    Categories

Next Webcast - Simple SQL Server Reporting - Click Here to Register
 

What-If analysis using SharePoint 2010 Excel Services


By:   |   Read Comments   |   Related Tips: > Sharepoint

Problem

Excel workbooks are published on SharePoint and viewed using the Excel Web Access web part. But the workbook is available in read-only mode when viewed using this web part. A configured Excel workbook can be very well used for developing applications to facilitate a what-if analysis. In this tip we will explore one of the ways to facilitate what-if analysis.

Solution

Excel is generally programmed by business users using formulas to derive / calculate values on pre-existing data. This calculation is based on a set of parameters that drive the calculation. Let us try to create an Excel spreadsheet with some data and calculated fields.

Step 1: Using Excel, create a new workbook. Create two fields with the names Value 1 and Value 2 and populate it with some numeric data.

Step 2: Right-click on a column and select "Define name", and name it "Operator". Our intention is to get a calculated value in a field named "Result" based on the selected operator.

my test

Step 3: For the Result field, add the formula as shown in the screenshot below.

result

Step 4: From the File menu, select "Save and Send" -> "Save to SharePoint", and select Publish Options. In the Parameters tab, click "Add", select the "Operator" object we created earlier and click "OK".

save to sharepoint

Step 5: When the same workbook is viewed using Excel Web Access web part, a parameters pane will be displayed which will have the same parameter that we added while publishing the workbook. Enter "*", click on Apply and watch the effect. Now enter "+" as the operator and you will be able to see that the calculated fields are updated accordingly!

excess web access

In real life projects, this feature can be effectively used for an application like a loan calculator, a tax calculator, creating graphs dynamically based on input parameters etc. for what-if analysis.

Next Steps


Last Update:


next webcast button


next tip button



About the author
MSSQLTips author Siddharth Mehta Siddharth Mehta is an Associate Manager with Accenture in the Avanade Division focusing on Business Intelligence.

View all my tips





Post a comment or let the author know this tip helped.

All comments are reviewed, so stay on subject or we may delete your comment. Note: your email address is not published. Required fields are marked with an asterisk (*).

*Name    *Email    Email me updates 


Signup for our newsletter
 I agree by submitting my data to receive communications, account updates and/or special offers about SQL Server from MSSQLTips and/or its Sponsors. I have read the privacy statement and understand I may unsubscribe at any time.



    



Learn more about SQL Server tools