
power-bi-salespulse-dashboard
Expert at implementing and customizing the SalesPulse 360 Power BI retail analytics dashboard for sales, profit, and regional analysis
- Installs
- 653
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/reason-machines/data-skills --skill power-bi-salespulse-dashboard- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads power-bi-salespulse-dashboard automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Power BI SalesPulse Dashboard Skill
Skill by ara.so — Data Skills collection.
Expert guidance for implementing, customizing, and extending the SalesPulse 360 Power BI retail analytics dashboard. This skill covers data modeling, DAX formulas, visual customization, automated refresh configuration, and multi-regional deployment strategies for comprehensive sales and profit analysis.
Project Overview
SalesPulse 360 is a production-ready Power BI dashboard designed for retail analytics, featuring:
- Multi-dimensional sales analysis across regions, categories, and time periods
- Profit margin tracking with automated exception alerts
- Predictive forecasting for 12-month sales projections
- Multilingual support with localized currency and date formats
- Responsive design that adapts to desktop and mobile viewing
- Automated refresh integration with live data sources
The dashboard transforms the Global Superstore dataset (or similar retail data) into actionable insights through interactive visualizations, dynamic filtering, and natural-language narratives.
Installation & Setup
Prerequisites
- Power BI Desktop (version 2.120 or higher)
- Power BI Pro or Premium license (for team sharing)
- Global Superstore dataset or compatible retail transaction data
Initial Setup
- Clone the repository:
git clone https://github.com/MahbubNibir/power-bi-retail-analytics-viz.git
cd power-bi-retail-analytics-viz
- Extract the dataset:
# Extract the compressed data file to a known location
unzip global-superstore-data.zip -d ./data/
- Open the Power BI file:
# Launch Power BI Desktop and open the main file
start SalesPulse360.pbix
- Configure data source path:
- Go to Home → Transform Data → Data Source Settings
- Update the file path to point to your extracted CSV location
- Click Close & Apply
Core Components
Data Model Structure
The dashboard uses a star schema with the following tables:
- Sales Fact Table: Transaction-level data (Order ID, Sales, Profit, Quantity)
- Date Dimension: Calendar table with year, quarter, month, week hierarchies
- Geography Dimension: Region, Country, State, City hierarchy
- Product Dimension: Category, Sub-Category, Product Name hierarchy
- Customer Dimension: Segment, Customer ID, Customer Name
- Threshold Configuration: Alert settings and business rules
Key DAX Measures
Total Sales
Total Sales = SUM(Sales[Sales Amount])
Profit Margin
Profit Margin =
DIVIDE(
SUM(Sales[Profit]),
SUM(Sales[Sales Amount]),
0
)
Year-over-Year Growth
YoY Sales Growth =
VAR CurrentYearSales = [Total Sales]
VAR PreviousYearSales =
CALCULATE(
[Total Sales],
DATEADD(Date[Date], -1, YEAR)
)
RETURN
DIVIDE(
CurrentYearSales - PreviousYearSales,
PreviousYearSales,
0
)
Moving Annual Total
MAT Sales =
CALCULATE(
[Total Sales],
DATESINPERIOD(
Date[Date],
LASTDATE(Date[Date]),
-12,
MONTH
)
)
Profit Alert Flag
Profit Alert =
VAR CurrentMargin = [Profit Margin]
VAR ThresholdMargin = SELECTEDVALUE(Config[Profit Margin Threshold], 0.15)
RETURN
IF(
CurrentMargin < ThresholdMargin,
"⚠️ Below Threshold",
"✓ Healthy"
)
Sales Forecast (12 Months)
Sales Forecast =
VAR ForecastPeriod = 12
VAR HistoricalData =
CALCULATETABLE(
ADDCOLUMNS(
VALUES(Date[Date]),
"@Sales", [Total Sales]
),
Date[Date] <= MAX(Date[Date])
)
RETURN
// Use FORECAST.ETS or external R/Python script
FORECAST.ETS(
MAX(Date[Date]) + ForecastPeriod,
HistoricalData,
[Date],
[@Sales]
)
Regional Performance Index
Regional Performance Index =
VAR RegionalSales = [Total Sales]
VAR GlobalAvgSales =
CALCULATE(
[Total Sales],
ALL(Geography[Region])
) / DISTINCTCOUNT(Geography[Region])
RETURN
DIVIDE(RegionalSales, GlobalAvgSales, 1) * 100
Customer Retention Rate
Customer Retention Rate =
VAR CurrentPeriodCustomers = DISTINCTCOUNT(Sales[Customer ID])
VAR PreviousPeriodCustomers =
CALCULATE(
DISTINCTCOUNT(Sales[Customer ID]),
DATEADD(Date[Date], -1, QUARTER)
)
VAR ReturningCustomers =
CALCULATE(
DISTINCTCOUNT(Sales[Customer ID]),
FILTER(
ALL(Date),
Date[Date] <= MAX(Date[Date]) &&
Date[Date] >= MIN(Date[Date])
)
)
RETURN
DIVIDE(ReturningCustomers, PreviousPeriodCustomers, 0)
Configuration
Threshold Settings
Create a configuration table to store business rules:
// Configuration Table (manually entered or imported)
Config =
DATATABLE(
"Setting Name", STRING,
"Value", DOUBLE,
{
{"Profit Margin Threshold", 0.15},
{"Return Rate Warning", 0.08},
{"Rolling Average Days", 90},
{"Forecast Confidence Level", 0.95}
}
)
Multi-Language Support
Implement field parameters for dynamic label switching:
// Language Selection (Create as Parameter)
Language = {
("English", NAMEOF(Language[English]), 0),
("Spanish", NAMEOF(Language[Spanish]), 1),
("French", NAMEOF(Language[French]), 2),
("German", NAMEOF(Language[German]), 3),
("Mandarin", NAMEOF(Language[Mandarin]), 4)
}
// Dynamic Label Measure
Sales Label =
SWITCH(
SELECTEDVALUE(Language[Ordinal]),
0, "Sales",
1, "Ventas",
2, "Ventes",
3, "Verkäufe",
4, "销售额",
"Sales" // Default
)
Currency Localization
// Dynamic Currency Symbol
Currency Symbol =
VAR SelectedRegion = SELECTEDVALUE(Geography[Region])
RETURN
SWITCH(
SelectedRegion,
"North America", "$",
"Europe", "€",
"Asia Pacific", "¥",
"Latin America", "R$",
"$" // Default
)
// Formatted Sales with Currency
Formatted Sales =
VAR SalesValue = [Total Sales]
VAR Symbol = [Currency Symbol]
RETURN
Symbol & FORMAT(SalesValue, "#,##0.00")
Row-Level Security (RLS)
Define security rules for regional access:
// RLS Rule for Geography Table
[Region] = USERNAME()
// Or for email-based assignment:
[Region] = LOOKUPVALUE(
UserRegionMapping[Region],
UserRegionMapping[Email],
USERPRINCIPALNAME()
)
Automated Refresh Configuration
Power BI Service Setup
-
Publish to Service:
- File → Publish → Select Workspace
- Choose your target workspace (requires Pro/Premium)
-
Configure Gateway (for on-premises data):
- Install Power BI Gateway on server with data access
- Configure data source credentials in Service
- Test connection
-
Schedule Refresh:
Settings → Datasets → [Your Dashboard] → Scheduled Refresh
- Frequency: Daily
- Time: 02:00 UTC (or multiple times for near-real-time)
- Send failure notifications: [Your email]
DirectQuery for Real-Time Data
Modify connection string for live querying:
// In Power Query Editor (Advanced Editor)
let
Source = Sql.Database(
"${DB_SERVER}",
"${DB_NAME}",
[
Query="SELECT * FROM SalesTransactions WHERE TransactionDate >= DATEADD(year, -2, GETDATE())",
CommandTimeout=#duration(0, 0, 5, 0)
]
)
in
Source
Common Customization Patterns
Adding New KPI Cards
- Create the measure:
Average Order Value =
DIVIDE(
[Total Sales],
DISTINCTCOUNT(Sales[Order ID]),
0
)
- Add card visual:
- Insert → Card
- Drag measure to Fields
- Format → Callout Value → Display Units: Auto
- Format → Data Label → Font size: 32pt
Custom Tooltips
Create a tooltip page with detailed breakdowns:
// Tooltip Measures
Tooltip - Top Products =
CONCATENATEX(
TOPN(
3,
VALUES(Product[Product Name]),
[Total Sales],
DESC
),
Product[Product Name] & ": " & FORMAT([Total Sales], "$#,##0"),
UNICHAR(10) // Line break
)
Dynamic Title Based on Selection
Dynamic Title =
VAR SelectedRegion = SELECTEDVALUE(Geography[Region], "All Regions")
VAR SelectedCategory = SELECTEDVALUE(Product[Category], "All Categories")
RETURN
"Sales Performance - " & SelectedRegion & " | " & SelectedCategory
Conditional Formatting for Tables
Apply color scales based on performance:
// Color Measure for Profit Margin
Profit Margin Color =
VAR Margin = [Profit Margin]
RETURN
SWITCH(
TRUE(),
Margin >= 0.20, "#28a745", // Green
Margin >= 0.15, "#ffc107", // Yellow
Margin >= 0.10, "#fd7e14", // Orange
"#dc3545" // Red
)
Advanced Features
Exception Alert System
Create a visual flag for underperforming segments:
Alert Count =
VAR LowMarginRegions =
COUNTROWS(
FILTER(
VALUES(Geography[Region]),
[Profit Margin] < 0.15
)
)
VAR HighReturnCategories =
COUNTROWS(
FILTER(
VALUES(Product[Category]),
[Return Rate] > 0.08
)
)
RETURN
LowMarginRegions + HighReturnCategories
Alert Details =
CONCATENATEX(
FILTER(
VALUES(Geography[Region]),
[Profit Margin] < 0.15
),
Geography[Region] & " margin at " & FORMAT([Profit Margin], "0.0%"),
", "
)
Drill-Through Configuration
- Create drill-through page named "Product Details"
- Add drill-through field: Drag Product[Product Name] to Drill-through well
- Add back button: Insert → Buttons → Back
- Add detailed visuals: Sales trend, regional breakdown, customer segments
Bookmarks for Scenario Analysis
// Create calculated table for scenarios
Scenarios =
DATATABLE(
"Scenario", STRING,
"Growth Rate", DOUBLE,
{
{"Conservative", 0.05},
{"Expected", 0.10},
{"Optimistic", 0.15}
}
)
// Scenario-adjusted forecast
Scenario Sales Forecast =
VAR BaselineSales = [Total Sales]
VAR GrowthRate = SELECTEDVALUE(Scenarios[Growth Rate], 0.10)
RETURN
BaselineSales * (1 + GrowthRate)
Troubleshooting
Issue: Data Refresh Fails
Error: "Data source connection failed"
Solution:
- Verify data source credentials in Power BI Service
- Check gateway status (if using on-premises data)
- Validate connection string:
// Test connection in Power Query
let
Source = Csv.Document(
File.Contents("${DATA_PATH}/sales.csv"),
[Delimiter=",", Columns=21, Encoding=65001, QuoteStyle=QuoteStyle.None]
)
in
Source
Issue: Slow Dashboard Performance
Symptoms: Visuals take >5 seconds to load
Solutions:
- Reduce data volume:
// Limit to recent 2 years
Filtered Sales =
CALCULATE(
[Total Sales],
Date[Year] >= YEAR(TODAY()) - 2
)
- Aggregate data in Power Query:
// Pre-aggregate by month and category
let
Source = Sales,
Grouped = Table.Group(
Source,
{"Year", "Month", "Category"},
{
{"Total Sales", each List.Sum([Sales Amount]), type number},
{"Total Profit", each List.Sum([Profit]), type number}
}
)
in
Grouped
- Use summarized tables for high-level views
Issue: Incorrect Totals After Filtering
Problem: Totals don't match sum of filtered rows
Solution: Use ALLSELECTED instead of ALL:
Percentage of Total =
DIVIDE(
[Total Sales],
CALCULATE([Total Sales], ALLSELECTED()),
0
)
Issue: RLS Not Working as Expected
Problem: Users see all data despite RLS rules
Checklist:
- Verify RLS roles are defined: Modeling → Manage Roles
- Test roles in Desktop: Modeling → View as Roles
- Assign users to roles in Power BI Service: Settings → Security
- Ensure USERNAME() or USERPRINCIPALNAME() matches user identifiers
Issue: Forecast Returns Errors
Problem: FORECAST.ETS throws "insufficient data" error
Solution:
Sales Forecast Safe =
VAR MinDataPoints = 24 // Need 2 years minimum
VAR DataPointCount = COUNTROWS(FILTER(ALL(Date), NOT(ISBLANK([Total Sales]))))
RETURN
IF(
DataPointCount >= MinDataPoints,
[Sales Forecast],
BLANK() // Return blank if insufficient data
)
Integration Patterns
Export to Excel with Macros
Enable Excel integration for advanced analysis:
' VBA code to refresh Power BI data in Excel
Sub RefreshPowerBIData()
Dim conn As WorkbookConnection
For Each conn In ThisWorkbook.Connections
conn.Refresh
Next conn
MsgBox "Data refreshed successfully"
End Sub
Embed in Web Application
Use Power BI Embedded API:
// JavaScript for embedding dashboard
const embedConfig = {
type: 'report',
id: '${POWERBI_REPORT_ID}',
embedUrl: 'https://app.powerbi.com/reportEmbed',
accessToken: '${POWERBI_ACCESS_TOKEN}', // Use OAuth flow
settings: {
filterPaneEnabled: true,
navContentPaneEnabled: true,
localeSettings: {
language: 'en-US',
formatLocale: 'en-US'
}
}
};
const embedContainer = document.getElementById('reportContainer');
const report = powerbi.embed(embedContainer, embedConfig);
REST API Data Push
Push real-time data to streaming dataset:
import requests
import os
def push_sales_data(transaction_data):
"""Push transaction data to Power BI streaming dataset"""
api_url = f"https://api.powerbi.com/beta/{os.environ['POWERBI_TENANT_ID']}/datasets/{os.environ['DATASET_ID']}/rows?key={os.environ['POWERBI_API_KEY']}"
payload = {
"rows": [
{
"OrderID": transaction_data["order_id"],
"Sales": transaction_data["amount"],
"Profit": transaction_data["profit"],
"Timestamp": transaction_data["timestamp"]
}
]
}
response = requests.post(api_url, json=payload)
return response.status_code == 200
Best Practices
-
Data Model Optimization:
- Use star schema (fact + dimensions)
- Remove unnecessary columns in Power Query
- Create hierarchies for drill-down navigation
- Use aggregated tables for summary views
-
DAX Performance:
- Avoid calculated columns where measures suffice
- Use TREATAS instead of FILTER when possible
- Store complex calculations as variables
- Test measure performance with DAX Studio
-
Visual Design:
- Limit to 5-7 key visuals per page
- Use consistent color schemes (accessibility compliant)
- Add tooltips for detailed context
- Include clear titles and labels
-
Security:
- Always implement RLS for multi-tenant deployments
- Store credentials in Azure Key Vault
- Use service principal for automated refresh
- Audit data access logs regularly
-
Maintenance:
- Document all custom DAX measures
- Version control .pbix files (Git LFS)
- Test dashboard with production-scale data
- Monitor refresh failures and performance metrics
This skill provides comprehensive coverage of implementing and extending the SalesPulse 360 dashboard for enterprise retail analytics scenarios.
FAQ
What does the power-bi-salespulse-dashboard skill do?
Expert at implementing and customizing the SalesPulse 360 Power BI retail analytics dashboard for sales, profit, and regional analysis
How do I install power-bi-salespulse-dashboard?
Run npx skills add https://github.com/reason-machines/data-skills --skill power-bi-salespulse-dashboard in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/power-bi-salespulse-dashboard/ (personal) or .claude/skills/power-bi-salespulse-dashboard/ (project).
Which AI agents can use power-bi-salespulse-dashboard?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is power-bi-salespulse-dashboard safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains power-bi-salespulse-dashboard?
It is published by reason-machines in reason-machines/data-skills. It has 653 recorded installs.
More from reason-machines/data-skills
apache-airflow-orchestration
reason-machines/data-skills
Expert knowledge of Apache Airflow for building, scheduling, and monitoring data pipelines and workflows
datatalks-data-engineering-zoomcamp
reason-machines/data-skills
Free 9-week data engineering course covering Docker, Terraform, Kestra, BigQuery, dbt, Spark, and Kafka with hands-on projects
llm-public-opinion-analytics-assistant
reason-machines/data-skills
Multi-platform hot search crawler and LLM-powered public opinion analysis system with clustering, sentiment analysis, and multi-channel push notifications
roblox-mm2-analytics-toolkit
reason-machines/data-skills
Analytics and inventory management toolkit for Roblox Murder Mystery 2 gameplay optimization
mm2-analytics-roblox-tracker
reason-machines/data-skills
Analyze Murder Mystery 2 gameplay data, track inventory, and optimize strategy using this Roblox analytics toolkit
mm2-roblox-analytics-toolkit
reason-machines/data-skills
Murder Mystery 2 gameplay analytics, inventory tracking, and strategy optimization toolkit for Roblox
Popular data & databases skills
supabase-postgres-best-practices
supabase/agent-skills
Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and scheduled jobs (pgcron, pgmq), vector/semantic search (pgvector), and restoring dumps (pgrestore) or importing data. Also load it when diagnosing slow queries, high CPU, timeouts, EXPLAIN plans, connection exhaustion, locking, bloat, or rows visible to the wrong user or tenant. This is not just a performance guide — schema, migration, security, and SQL authoring tasks need these rules too, even for a one-column change or a single query.
prisma-client-api
prisma/skills
Prisma Client API reference covering model queries, filters, operators, and client methods. Use when writing database queries, using CRUD operations, filtering data, or configuring Prisma Client. Triggers on "prisma query", "findMany", "create", "update", "delete", "$transaction".
prisma-database-setup
prisma/skills
Deprecated compatibility name for prisma-orm-setup. Use only when a user or existing integration explicitly invokes prisma-database-setup; otherwise select prisma-orm-setup.
prisma-cli
prisma/skills
Prisma ORM 7 CLI reference for existing Prisma 7 applications or explicitly selected Prisma 7 workflows. Covers prisma init, generate, migrate, db, dev, studio, and mcp. For setup, connection repair, or Prisma 8, use prisma-orm-setup; not the Prisma Platform CLI.
prisma-postgres
prisma/skills
Deprecated compatibility name for prisma-postgres-setup. Use only when a user or existing integration explicitly invokes prisma-postgres; otherwise select prisma-postgres-setup.
prisma-driver-adapter-implementation
prisma/skills
Required reference for Prisma ORM 7 SQL driver adapter work. Use when implementing or modifying adapters, adding database drivers, or touching SqlDriverAdapter, Transaction, savepoint, result mapping, or DriverAdapterError behavior. Covers current transaction lifecycle, optional savepoint hooks, original database-error preservation, and verification.