Learning by Doing Series

Financial Ratios Analysis in BI

Topic 26 — Executive Dashboard Using DAX Measures. Build the final executive Power BI dashboard with DAX-driven KPIs, trends, rankings, and status indicators.

Topic 26 — Executive Dashboard Using DAX Measures

Design the final executive dashboard page using DAX measures, slicers, KPI cards, trend visuals, ranking tables, and validation indicators.

SQL Server ViewsPower BI ModelDAX MeasuresExecutive Dashboard

Production / Cybersecurity Warning

This exercise uses synthetic training data. Do not connect Power BI to production financial systems, corporate databases, or real accounting data without authorization, sandbox testing, least-privilege access, change-control approval, and cybersecurity compliance.

Objective

Design the final executive dashboard page using DAX measures, slicers, KPI cards, trend visuals, ranking tables, and validation indicators.

Approach A
Use ratios precalculated in Python and SQL Server.
Approach B
Recalculate selected ratios dynamically in Power BI using DAX.

Business Scenario

The final dashboard combines the two BI worlds: the controlled SQL Server model and the dynamic DAX calculation layer inside Power BI.

OutputPurpose
Executive Overview pageTopic output
DAX KPI cardsTopic output
Trend chartsTopic output
Company rankingsTopic output
Validation indicatorsTopic output

Step-by-Step Practice

Step 1 — Connect Power BI to SQL Server

Use Power BI Desktop to connect to Server: JCDCOMPUTER and Database: FinancialRatiosBI.

Power BI Connection
Get Data → SQL Server\nServer: JCDCOMPUTER\nDatabase: FinancialRatiosBI\nMode: Import

Step 2 — Import the Required Tables and Views

Use the SQL views for reporting and the dimension/fact tables when DAX calculations require base financial statement values.

Recommended imports
Dim_Company\nDim_Period\nFact_Income_Statement\nFact_Balance_Sheet\nFact_Cash_Flow\nFact_Debt_Ratios\nvw_All_Financial_Ratios\nvw_Executive_Financial_Summary\nvw_Latest_Period_Ratios

Step 3 — Create or Confirm Relationships

Connect the company and period dimensions to the imported fact tables and views.

Power BI Relationships
Dim_Company[CompanyID] → Fact and View tables[CompanyID]\nDim_Period[PeriodID] → Fact and View tables[PeriodID]

Step 4 — Add the DAX Measures

Create a new measure table named DAX Financial Measures and paste the measures below.

DAX - Final Measures
-- ============================================================
-- Financial Ratios Analysis in BI
-- Topic 26 - Executive Dashboard Using DAX Measures
-- ============================================================

-- ------------------------------------------------------------
-- Financial Health Score using DAX Measures
-- 100-point score: 20 points per area
-- ------------------------------------------------------------

DAX Liquidity Score =
SWITCH(
    TRUE(),
    [DAX Current Ratio] >= 1.8, 20,
    [DAX Current Ratio] >= 1.2, 15,
    [DAX Current Ratio] >= 1.0, 10,
    5
)

DAX Profitability Score =
SWITCH(
    TRUE(),
    [DAX Net Profit Margin] >= 0.15, 20,
    [DAX Net Profit Margin] >= 0.08, 15,
    [DAX Net Profit Margin] >= 0.03, 10,
    5
)

DAX Debt Score =
SWITCH(
    TRUE(),
    [DAX Debt Ratio] <= 0.35, 20,
    [DAX Debt Ratio] <= 0.55, 15,
    [DAX Debt Ratio] <= 0.70, 10,
    5
)

DAX Cash Flow Score =
SWITCH(
    TRUE(),
    [DAX Operating Cash Flow to Sales] >= 0.15, 20,
    [DAX Operating Cash Flow to Sales] >= 0.08, 15,
    [DAX Operating Cash Flow to Sales] >= 0.03, 10,
    5
)

DAX Valuation Score =
SWITCH(
    TRUE(),
    [Precalc Current Ratio] >= 0, 20,
    10
)

DAX Financial Health Score =
[DAX Liquidity Score]
+ [DAX Profitability Score]
+ [DAX Debt Score]
+ [DAX Cash Flow Score]
+ [DAX Valuation Score]

DAX Financial Health Category =
SWITCH(
    TRUE(),
    [DAX Financial Health Score] >= 85, "Strong",
    [DAX Financial Health Score] >= 70, "Healthy",
    [DAX Financial Health Score] >= 55, "Watch",
    "Risk"
)

-- ------------------------------------------------------------
-- Executive Alert Measures
-- ------------------------------------------------------------

Liquidity Alert =
IF(
    [DAX Current Ratio] < 1.2,
    1,
    0
)

Profitability Alert =
IF(
    [DAX Net Profit Margin] < 0.05,
    1,
    0
)

Debt Alert =
IF(
    [DAX Debt Ratio] > 0.60,
    1,
    0
)

Cash Flow Alert =
IF(
    [DAX Operating Cash Flow to Sales] < 0.05,
    1,
    0
)

Executive Alert Count =
[Liquidity Alert]
+ [Profitability Alert]
+ [Debt Alert]
+ [Cash Flow Alert]

Executive Dashboard Status =
IF(
    [Executive Alert Count] = 0,
    "No Major Alerts",
    FORMAT([Executive Alert Count], "0") & " Area(s) Need Review"
)

-- ------------------------------------------------------------
-- Dashboard Narrative Measure
-- ------------------------------------------------------------

Executive Narrative =
VAR CompanyText =
    SELECTEDVALUE(Dim_Company[CompanyName], "Selected companies")
VAR PeriodText =
    SELECTEDVALUE(Dim_Period[YearQuarter], "selected period")
RETURN
CompanyText
& " shows a financial health category of "
& [DAX Financial Health Category]
& " for "
& PeriodText
& ". Dashboard status: "
& [Executive Dashboard Status]
& "."

Step 5 — Validate the Result

Create cards, tables, and trend visuals to confirm that the measures respond to Company, Industry, Fiscal Year, and Quarter slicers.

Expected Output

Expected result
Executive dashboard page completed.
DAX-driven score and category available.
Alerts and narrative respond to slicers.

Business Interpretation

This topic completes the advanced Power BI version. The same financial model can now be explored through both stored SQL results and dynamic DAX calculations.

Final Result of Topic 26

The Power BI model now supports a stronger BI architecture: stored ratios for auditability and dynamic DAX ratios for interactivity.

Next topic: Advanced Power BI publishing and storytelling.

Topic 26 — Executive Dashboard Using DAX Measures

Diseñar la página final de dashboard ejecutivo usando medidas DAX, slicers, tarjetas KPI, visuales de tendencia, rankings e indicadores de validación.

SQL Server ViewsPower BI ModelDAX MeasuresExecutive Dashboard

Advertencia de Producción / Ciberseguridad

Este ejercicio usa data sintética de entrenamiento. No conectes Power BI a sistemas financieros de producción, bases corporativas o data contable real sin autorización, pruebas en sandbox, acceso de mínimo privilegio, aprobación de control de cambios y cumplimiento de ciberseguridad.

Objetivo

Diseñar la página final de dashboard ejecutivo usando medidas DAX, slicers, tarjetas KPI, visuales de tendencia, rankings e indicadores de validación.

Approach A
Usar ratios precalculados en Python y SQL Server.
Approach B
Recalcular ratios seleccionados dinámicamente en Power BI usando DAX.

Escenario de Negocio

El dashboard final combina los dos mundos de BI: el modelo controlado en SQL Server y la capa dinámica de cálculo DAX dentro de Power BI.

OutputPurpose
Executive Overview pageTopic output
DAX KPI cardsTopic output
Trend chartsTopic output
Company rankingsTopic output
Validation indicatorsTopic output

Práctica Paso a Paso

Paso 1 — Conectar Power BI a SQL Server

Usa Power BI Desktop para conectarte a Server: JCDCOMPUTER y Database: FinancialRatiosBI.

Power BI Connection
Get Data → SQL Server\nServer: JCDCOMPUTER\nDatabase: FinancialRatiosBI\nMode: Import

Paso 2 — Importar Tablas y Views Requeridas

Usa las views SQL para reporting y las tablas de dimensión/fact cuando las medidas DAX necesiten valores base de estados financieros.

Recommended imports
Dim_Company\nDim_Period\nFact_Income_Statement\nFact_Balance_Sheet\nFact_Cash_Flow\nFact_Debt_Ratios\nvw_All_Financial_Ratios\nvw_Executive_Financial_Summary\nvw_Latest_Period_Ratios

Paso 3 — Crear o Confirmar Relaciones

Conecta las dimensiones de compañía y período con las tablas fact y views importadas.

Power BI Relationships
Dim_Company[CompanyID] → Fact and View tables[CompanyID]\nDim_Period[PeriodID] → Fact and View tables[PeriodID]

Paso 4 — Agregar las Medidas DAX

Crea una tabla de medidas llamada DAX Financial Measures y pega las medidas de abajo.

DAX - Final Measures
-- ============================================================
-- Financial Ratios Analysis in BI
-- Topic 26 - Executive Dashboard Using DAX Measures
-- ============================================================

-- ------------------------------------------------------------
-- Financial Health Score using DAX Measures
-- 100-point score: 20 points per area
-- ------------------------------------------------------------

DAX Liquidity Score =
SWITCH(
    TRUE(),
    [DAX Current Ratio] >= 1.8, 20,
    [DAX Current Ratio] >= 1.2, 15,
    [DAX Current Ratio] >= 1.0, 10,
    5
)

DAX Profitability Score =
SWITCH(
    TRUE(),
    [DAX Net Profit Margin] >= 0.15, 20,
    [DAX Net Profit Margin] >= 0.08, 15,
    [DAX Net Profit Margin] >= 0.03, 10,
    5
)

DAX Debt Score =
SWITCH(
    TRUE(),
    [DAX Debt Ratio] <= 0.35, 20,
    [DAX Debt Ratio] <= 0.55, 15,
    [DAX Debt Ratio] <= 0.70, 10,
    5
)

DAX Cash Flow Score =
SWITCH(
    TRUE(),
    [DAX Operating Cash Flow to Sales] >= 0.15, 20,
    [DAX Operating Cash Flow to Sales] >= 0.08, 15,
    [DAX Operating Cash Flow to Sales] >= 0.03, 10,
    5
)

DAX Valuation Score =
SWITCH(
    TRUE(),
    [Precalc Current Ratio] >= 0, 20,
    10
)

DAX Financial Health Score =
[DAX Liquidity Score]
+ [DAX Profitability Score]
+ [DAX Debt Score]
+ [DAX Cash Flow Score]
+ [DAX Valuation Score]

DAX Financial Health Category =
SWITCH(
    TRUE(),
    [DAX Financial Health Score] >= 85, "Strong",
    [DAX Financial Health Score] >= 70, "Healthy",
    [DAX Financial Health Score] >= 55, "Watch",
    "Risk"
)

-- ------------------------------------------------------------
-- Executive Alert Measures
-- ------------------------------------------------------------

Liquidity Alert =
IF(
    [DAX Current Ratio] < 1.2,
    1,
    0
)

Profitability Alert =
IF(
    [DAX Net Profit Margin] < 0.05,
    1,
    0
)

Debt Alert =
IF(
    [DAX Debt Ratio] > 0.60,
    1,
    0
)

Cash Flow Alert =
IF(
    [DAX Operating Cash Flow to Sales] < 0.05,
    1,
    0
)

Executive Alert Count =
[Liquidity Alert]
+ [Profitability Alert]
+ [Debt Alert]
+ [Cash Flow Alert]

Executive Dashboard Status =
IF(
    [Executive Alert Count] = 0,
    "No Major Alerts",
    FORMAT([Executive Alert Count], "0") & " Area(s) Need Review"
)

-- ------------------------------------------------------------
-- Dashboard Narrative Measure
-- ------------------------------------------------------------

Executive Narrative =
VAR CompanyText =
    SELECTEDVALUE(Dim_Company[CompanyName], "Selected companies")
VAR PeriodText =
    SELECTEDVALUE(Dim_Period[YearQuarter], "selected period")
RETURN
CompanyText
& " shows a financial health category of "
& [DAX Financial Health Category]
& " for "
& PeriodText
& ". Dashboard status: "
& [Executive Dashboard Status]
& "."

Paso 5 — Validar el Resultado

Crea cards, tablas y visuales de tendencia para confirmar que las medidas respondan a slicers de Company, Industry, Fiscal Year y Quarter.

Resultado Esperado

Expected result
Executive dashboard page completed.
DAX-driven score and category available.
Alerts and narrative respond to slicers.

Interpretación de Negocio

Este tópico completa la versión avanzada de Power BI. El mismo modelo financiero ahora puede explorarse tanto con resultados almacenados en SQL como con cálculos dinámicos DAX.

Resultado Final del Topic 26

El modelo Power BI ahora soporta una arquitectura BI más fuerte: ratios almacenados para auditabilidad y ratios dinámicos DAX para interactividad.

Próximo tópico: Advanced Power BI publishing and storytelling.