📊 Chapter 10: Using Excel Templates in BI Publisher (Global HR Use Case)
While RTF templates are ideal for formal, printable layouts, Excel templates are perfect for:
-
Data-heavy reports
-
Tabular summaries
-
Dashboards with charts and pivot tables
In this chapter, you’ll learn to build Excel templates for BI Publisher using Global HR data, such as a report of active employees by business unit.
✅ 1. When to Use Excel Templates
Use Case | Reason to Use Excel |
---|---|
Data summaries | Quick filtering, pivoting, analysis |
Headcount reports | Easy to update and chart |
Dashboards | Built-in Excel charts and formulas |
Complex calculations | Leverage Excel’s native functions |
✅ 2. Sample Use Case: Headcount by Business Unit
📘 Data Model SQL:
✅ 3. Steps to Create an Excel Template
🧩 Step 1: Download Sample XML
From the data model:
-
Run the query
-
Click Export > Save As Sample Data
📄 Step 2: Open Excel & Load XML
-
Open a blank Excel workbook
-
Go to BI Publisher > Load XML Data
-
Load the
sample_data.xml
📋 Step 3: Insert Table Using BI Publisher Add-in
-
Click Insert > Table Wizard
-
Group by:
business_unit
-
Add fields:
department_name
,full_name
,person_number
,job_name
,hire_date
-
Customize formatting (colors, fonts, etc.)
✅ 4. Add Totals and Formulas
Use Excel formulas for summaries:
You can also use:
-
Subtotal per business unit
-
Calculated columns (e.g., tenure = TODAY() - hire_date)
✅ 5. Insert Pivot Table and Charts
📊 Add Pivot Table:
-
Select full data table
-
Insert → Pivot Table
-
Group by:
-
Rows: Business Unit
-
Values: Count of Person Number (i.e., employee count)
-
📈 Add a Chart:
-
Insert a bar chart showing headcount per BU
-
Format it with dynamic titles
✅ 6. Use BI Publisher Syntax in Excel
-
Use
<?for-each:DATA_DS?>
in a cell to begin row iteration -
Use
<?end for-each?>
to close -
Use
<?field_name?>
to insert data
🔹 Example in Excel Cell:
✅ 7. Upload Excel Template to BI Publisher
-
Go to BI Catalog > Open Report
-
Click Edit > Layout
-
Click + > Upload Excel Template
-
Set output format: Excel (XLSX)
-
Save and test the report
✅ 8. Advanced: Dynamic Sheet Tabs
To create separate tabs per business unit:
-
Use this syntax in cell A1 of each sheet:
-
Use:
-
Each sheet will be named after the business unit
✅ 9. Summary
Feature | Benefit |
---|---|
Excel layout | Ideal for HR data summaries |
Pivot tables | Quick grouping and slicing |
Charts | Visual headcount trends |
Dynamic sheets | One sheet per business unit |
BI syntax in Excel | Same as RTF: for-each , if , etc. |
📌 Next Chapter Preview:
Chapter 11: Creating Parameterized Reports
-
Add prompts for department, BU, job
-
Use LOVs (List of Values)
-
Cascading and default values
No comments:
Post a Comment