Power BI Integration
Connect Power BI Desktop and Power BI Service to Olytix Core's semantic layer using the XMLA endpoint. This enables native Power BI experiences while querying your unified semantic model.
Prerequisites
- Olytix Core server running with DAX API enabled
- Power BI Desktop (latest version recommended)
- API key or service account credentials
- Network access to Olytix Core server from Power BI
Connection Overview
Power BI connects to Olytix Core via the XMLA protocol endpoint:
http://your-olytix-core-server:8000/api/v1/dax/xmla
For production environments, use HTTPS:
https://your-olytix-core-server.com/api/v1/dax/xmla
Power BI Desktop Connection
Step 1: Open Get Data
- Open Power BI Desktop
- Click Get Data on the Home ribbon
- Search for Analysis Services or select Azure > Azure Analysis Services
Step 2: Configure Connection
Enter your Olytix Core XMLA endpoint in the server field:
| Field | Value |
|---|---|
| Server | http://localhost:8000/api/v1/dax/xmla |
| Database | Olytix Core (or your project name) |
Step 3: Authentication
Select the authentication method:
Anonymous (Development)
For local development without authentication:
- Select Anonymous authentication
- Click Connect
API Key Authentication
For API key authentication:
- Select Basic authentication
- Enter any username (e.g.,
api) - Enter your API key as the password
- Click Connect
Azure AD / OAuth
For enterprise SSO:
- Select Microsoft account or Organizational account
- Sign in with your credentials
- Olytix Core validates the token and applies user-specific security
Step 4: Select Data
After connecting:
- The Navigator window displays available cubes
- Expand a cube to see dimensions and measures
- Select the tables/cubes you want to import
- Click Load or Transform Data
Import vs DirectQuery
Import Mode
Data is imported into Power BI's in-memory model:
Pros:
- Fastest query performance
- Full DAX functionality
- Works offline
Cons:
- Requires scheduled refresh
- Data may be stale
- Memory constraints for large datasets
DirectQuery Mode
Queries are sent to Olytix Core in real-time:
Pros:
- Always current data
- No memory constraints
- Centralized governance
Cons:
- Requires network connectivity
- Query latency depends on Olytix Core
- Some DAX features limited
Enabling DirectQuery
- In Get Data, after entering server details
- Check Connect live option
- This establishes a DirectQuery connection
Building Reports
Using Cubes as Tables
Olytix Core cubes appear as tables in Power BI:
- Drag dimensions to rows/columns
- Drag measures to values
- Power BI generates DAX queries automatically
Example: Revenue by Region Chart
- Add a Clustered Bar Chart visual
- Drag
orders[region]to Axis - Drag
orders[total_revenue]to Values - Power BI generates:
EVALUATE
SUMMARIZECOLUMNS(
'orders'[region],
"total_revenue", SUM('orders'[amount])
)
Creating Custom Measures
Add calculated measures in Power BI:
Revenue Growth =
VAR CurrentRevenue = SUM(orders[amount])
VAR PriorRevenue = CALCULATE(
SUM(orders[amount]),
PREVIOUSYEAR(orders[order_date])
)
RETURN
DIVIDE(CurrentRevenue - PriorRevenue, PriorRevenue)
Power BI Service
Publishing Reports
- In Power BI Desktop, click Publish
- Select your workspace
- The report and dataset are uploaded
Gateway Configuration
For on-premises Olytix Core servers, configure a data gateway:
- Install Power BI Data Gateway on a server with network access to Olytix Core
- Open Power BI Service > Settings > Manage gateways
- Add a new data source:
| Setting | Value |
|---|---|
| Data Source Type | Analysis Services |
| Server | http://your-olytix-core-server:8000/api/v1/dax/xmla |
| Database | Olytix Core |
| Authentication | Basic or OAuth2 |
Scheduled Refresh
For Import mode datasets:
- Go to dataset settings in Power BI Service
- Expand Scheduled refresh
- Configure refresh frequency (up to 8x/day for Pro, 48x/day for Premium)
- Add gateway credentials if required
Troubleshooting
Connection Failed
Error: Cannot connect to server
Solutions:
- Verify Olytix Core server is running:
curl http://localhost:8000/api/v1/health - Check network connectivity and firewall rules
- Verify the XMLA endpoint URL is correct
- Ensure API key is valid
Authentication Error
Error: Access denied or invalid credentials
Solutions:
- Verify API key is correct
- Check API key has DAX API permissions
- For OAuth, ensure user is authorized in Olytix Core
- Try regenerating API key
Cube Not Found
Error: The cube 'name' does not exist
Solutions:
- Verify cube name matches exactly (case-sensitive)
- Ensure project is compiled:
POST /api/v1/unified/compile - Check cube is defined in your Olytix Core project
- List available cubes:
GET /api/v1/dax/cubes
Query Timeout
Error: Query execution timeout
Solutions:
- Simplify the query or reduce data volume
- Add filters to limit result set
- Increase server timeout settings
- Use pre-aggregations for common patterns
Unsupported DAX Function
Error: Function 'XYZ' is not supported
Solutions:
- Check Olytix Core's supported function list
- Use alternative supported functions
- Create a custom measure in Olytix Core instead
- Request function support via feature request
Best Practices
Performance Optimization
- Use DirectQuery for large datasets to avoid memory limits
- Create aggregations in Olytix Core for common query patterns
- Limit initial data load with query parameters
- Use incremental refresh for historical data
Security
- Use service accounts for production connections
- Enable RLS in Olytix Core rather than Power BI
- Rotate API keys regularly
- Use HTTPS for all production connections
Governance
- Centralize measures in Olytix Core for consistency
- Document custom Power BI measures that reference Olytix Core
- Version control your Olytix Core semantic definitions
- Monitor query patterns to optimize pre-aggregations
Advanced Configuration
Custom Connection String
For advanced scenarios, use a custom connection string:
Data Source=http://your-olytix-core-server:8000/api/v1/dax/xmla;
Initial Catalog=Olytix Core;
Persist Security Info=True;
Integrated Security=False;
User ID=api;
Password=YOUR_API_KEY
Environment-Specific Connections
Use Power BI parameters for environment switching:
- Create a parameter:
ServerUrl - Set values for each environment:
- Development:
http://localhost:8000/api/v1/dax/xmla - Staging:
https://staging.olytix-core.example.com/api/v1/dax/xmla - Production:
https://olytix-core.example.com/api/v1/dax/xmla
- Development:
- Reference parameter in connection settings
Row-Level Security
Olytix Core enforces RLS based on user context:
- Configure RLS policies in Olytix Core cube definitions
- Use OAuth authentication to pass user identity
- Olytix Core automatically filters data based on user roles
Example Olytix Core RLS policy:
# In cube definition
security:
row_level:
- name: region_filter
sql: "region = '{{ user.region }}'"
roles: ["regional_manager"]
Excel Integration
Connect Excel to Olytix Core via XMLA:
Excel 2016+
- Go to Data > Get Data > From Database > From Analysis Services
- Enter Olytix Core XMLA endpoint
- Select authentication method
- Choose cubes to connect
Pivot Tables
Create PivotTables connected to Olytix Core:
- Insert PivotTable from Olytix Core connection
- Drag dimensions to Rows/Columns
- Drag measures to Values
- Excel generates DAX queries automatically