powershell and powerpivot – two powers in one, on their way to powerview in sharepoint

23
PowerShell and PowerPivot two powers in one, on their way to PowerView in SharePoint Rayis Imayev Dawn InfoTek Inc. Twitter: @RayisImayev; Email: [email protected]

Upload: rayis-imayev

Post on 14-Jan-2017

705 views

Category:

Data & Analytics


2 download

TRANSCRIPT

Page 1: PowerShell and PowerPivot – two powers in one, on their way to PowerView in SharePoint

PowerShell and PowerPivot – two powers in one, on their way to PowerView in SharePoint

Rayis ImayevDawn InfoTek Inc.Twitter: @RayisImayev; Email: [email protected]

Page 2: PowerShell and PowerPivot – two powers in one, on their way to PowerView in SharePoint

GOLD

THANK YOU SPONSORS!RA

FFLE

SILV

ER

PLATINUM

Page 3: PowerShell and PowerPivot – two powers in one, on their way to PowerView in SharePoint

3

PowerPivot / PowerViewData modeling

Visualization

Page 4: PowerShell and PowerPivot – two powers in one, on their way to PowerView in SharePoint

4

History of PowerPivot2010 Add-on in Excel 2010

support in SharePoint 2010

2013 Built-in feature in Excel 2013Enriched support in SharePoint 2013

2016 More improvements in Excel 2016To be available in SharePoint 2016 later

Page 5: PowerShell and PowerPivot – two powers in one, on their way to PowerView in SharePoint

5

History of PowerView2010 Addition to SharePoint 2010

2013 Built-in feature in Excel 2013Enriched support in SharePoint 2013

2016 Turned off by default in Excel 2016To be available in SharePoint 2016 later

Page 6: PowerShell and PowerPivot – two powers in one, on their way to PowerView in SharePoint

6

Excel PowerPivot & SharePoint PowerView

Page 7: PowerShell and PowerPivot – two powers in one, on their way to PowerView in SharePoint

7

PowerPivot 2010 vs. PowerPivot 2013 PowerPivot

model formats format are different

You can upgrade your model from 2010 to 2013

Mixed environment is not advised

Page 8: PowerShell and PowerPivot – two powers in one, on their way to PowerView in SharePoint

8

PowerView reporting model in SharePoint 2013

A. Excel PowerPivot in SharePoint (.xlsx file)B. BISM connection to (A) PowerPivot model (.rsds file)C. SharePoint PowerView report based on (B) connection (.rdlx file)

(A) Excel PowerPivot model (B) BISM data connection (C) SharePoint PowerView report

Page 9: PowerShell and PowerPivot – two powers in one, on their way to PowerView in SharePoint

9

Why I don’t like PowerView in Excel ?

Page 10: PowerShell and PowerPivot – two powers in one, on their way to PowerView in SharePoint

10

I like this model because:

1. Replace PowerPivot model with a SSAS Tabular database

2. Update current BISM connection3. And existent PowerView will continue working

(A) Excel PowerPivot model (B) BISM data connection (C) SharePoint PowerView report(A) Tabular SSAS database

Page 11: PowerShell and PowerPivot – two powers in one, on their way to PowerView in SharePoint

11

Base line for this session:

1. PowerPivot model from Excel 20132. PowerView pulls data though a BISM connection3. And all these elements reside in SharePoint 2013

(A) Excel PowerPivot model (B) BISM data connection (C) SharePoint PowerView report

Page 12: PowerShell and PowerPivot – two powers in one, on their way to PowerView in SharePoint

12

Getting to close to a problem to solve:

PowerPivot model is createdIt needs to be uploaded to UAT & PROD SharePoint environment

Excel PowerPivot model

UAT

PROD

Page 13: PowerShell and PowerPivot – two powers in one, on their way to PowerView in SharePoint

13

Getting even more scarier!

Army of PowerPivot modelsA “few” more environments to deploy

Excel PowerPivot models

UAT

PROD

DIT

SIT

Page 14: PowerShell and PowerPivot – two powers in one, on their way to PowerView in SharePoint

14

I needed help to deploy PowerPivot models

Ask someoneOr

Write a code

Page 15: PowerShell and PowerPivot – two powers in one, on their way to PowerView in SharePoint

15

Write a code from Excel: Workbook.RefreshAll

Almost no settings to change

Page 16: PowerShell and PowerPivot – two powers in one, on their way to PowerView in SharePoint

16

Write a code for PowerPivot in SharePoint:

Changes are not saved back to Excel PowerPivot file in SharePoint.

Page 17: PowerShell and PowerPivot – two powers in one, on their way to PowerView in SharePoint

17

Short life of PowerPivot data SharePoint:

Excel PowerPivot model in SharePoint

Transformation

in SharePoint

Use / Interaction

Page 18: PowerShell and PowerPivot – two powers in one, on their way to PowerView in SharePoint

18

Let’s explore a PowerPivot Excel file:

PowerPivotModel(.xlsx).zip..\xl\model\item.data file

Page 19: PowerShell and PowerPivot – two powers in one, on their way to PowerView in SharePoint

19

We can restore item.data to a SSAS Tabular server

1) Item.data file is an backup file of SSAS tabular database and we can restore this item.data (item.abf) file to a tabular SSAS server database.

2) Then we can change settings of the newly restored database (along with its connection strings).

3) And save it back to our Excel file.And

PowerShell can do this

all!

Page 20: PowerShell and PowerPivot – two powers in one, on their way to PowerView in SharePoint

20

PowerShell deployment script steps

1. Scan through a folder for Excel files2. Rename .xlsx file to .zip file3. Unzip .zip file to a model folder4. Take item.data file and rename it to item.abf file5. Connect to a SSAS Tabular server6. Run XMLA command to restore item.abf archive file to a

tabular database on server7. Run XMLA command to update required database

connection strings8. Run XMLA command to backup tabular database back to

item.abf9. Rename item.abf file to item.data file 10. Copy modified item.data file to the model folder11. Archive model folder to .zip file12. Rename .zip file to .xlsx file

Page 22: PowerShell and PowerPivot – two powers in one, on their way to PowerView in SharePoint

22

Some extra time…

Page 23: PowerShell and PowerPivot – two powers in one, on their way to PowerView in SharePoint

Thank you!Toronto Enterprise Collaboration User GroupChange Management, Governance, SharePoint, Office 365, Yammer, PowerBI, etchttp://www.meetup.com/TSPBUG/Toronto SharePoint Business Users Grouphttp://www.meetup.com/TorontoSPUG/

Saturday July 9, 2016

See you next year!