NexusInsightCards Documentation

Learn how to build high-density, actionable executive dashboards in minutes using our enterprise-grade Power BI custom visual and advanced DAX patterns.

# Complete Data Roles Configuration

Data Role Description Type
KPI Category The dimension used to split and generate individual cards. Grouping
Data Field The primary numeric value displayed in the center. Measure
Target Value Comparison metric for variance percentage and dynamic indicators (▲/▼). Optional
Trend Axis Time intelligence axis required to render Sparklines. Grouping
Dynamic Format String A measure returning a DAX format string to dynamically format the primary value. PRO Measure
Unit Label (Measure) A dynamic measure for the unit text displayed next to the value (e.g., 'M', 'bn'). PRO Measure
Conditional Border Color A measure to dynamically determine the left border color (must return a Hex code). PRO Measure
Dynamic Config (JSON) Advanced JSON payload to override icons, colors, and sparkline types per card. PRO Measure
Reference Tooltip HTML-supported text for dynamic contextual alerts at the bottom of the card. PRO Measure

# Format Pane Settings

Grid Layout

  • Columns: Set the number of columns (1-10) for your CSS grid.
  • Card Dimensions: Manually adjust absolute Width and Height (px).
  • Gap & Padding: Control the spacing between and inside the KPI cards.

Cards Styling

  • Aggregation: Choose Sum, Average, or Last Point rendering.
  • Icons: Select from 13 built-in SVG icons and apply 3D drop-shadows.
  • Sparklines: Toggle Line, Area, Bar, Progress, or Gauge charts.

Variance & Colors

  • Status Colors: Define Custom Good, Bad, and Neutral Hex colors.
  • Indicators: Toggle the automated ▲/▼ variance percentage calculation display.

Advanced Layout

  • Insight Text: Enable/Disable the Smart Alert narrative footers.
  • Dividers: Add customizable separating lines (solid, dashed, dotted) above insights.

Enterprise DAX Recipes

Copy and paste these enterprise-grade DAX patterns into your model to unlock the visual's maximum potential.

1. Smart Base Measures (Mixed Aggregations)

When using an unpivoted Master Dataset for multiple KPIs, you cannot simply SUM percentages. Use these dynamic base measures in the Data Field and Target Value roles to automatically apply AVERAGE to rates and SUM to volumes.

Total Actual = 
VAR SelectedFormat = SELECTEDVALUE('Nexus_Master_Dataset'[Format_Type])

RETURN
    IF(
        SelectedFormat IN {"Percent", "Decimal"},
        AVERAGE('Nexus_Master_Dataset'[Actual_Value]),
        SUM('Nexus_Master_Dataset'[Actual_Value])
    )
Total Target = 
VAR SelectedFormat = SELECTEDVALUE('Nexus_Master_Dataset'[Format_Type])

RETURN
    IF(
        SelectedFormat IN {"Percent", "Decimal"},
        AVERAGE('Nexus_Master_Dataset'[Target_Value]),
        SUM('Nexus_Master_Dataset'[Target_Value])
    )

2. Dynamic JSON Configuration

Drop this measure into the Dynamic Configuration (JSON) role to independently control the icon, shadow, and chart type for each specific KPI.

Nexus Dynamic Config = 
VAR SelectedKPI = SELECTEDVALUE ( 'Nexus_Master_Dataset'[KPI_Name] )
RETURN
    SWITCH (
        SelectedKPI,
        "Revenue", "{""icon"":""money"", ""color"":""#1D4ED8"", ""shadow"":""#1D4ED8"", ""trendChart"": { ""type"": ""area"", ""color"": ""#60A5FA"" } }",
        "Daily Orders", "{""icon"":""shoppingCart"", ""color"":""#2563EB"", ""shadow"":""#2563EB"", ""trendChart"": { ""type"": ""bar"", ""color"": ""#93C5FD"" } }",
        "Average Order Value", "{""icon"":""money"", ""color"":""#6D28D9"", ""shadow"":""#6D28D9"", ""trendChart"": { ""type"": ""line"", ""color"": ""#A78BFA"" } }",
        "Discount Rate", "{""icon"":""target"", ""color"":""#D97706"", ""shadow"":""#D97706"", ""trendChart"": { ""type"": ""line"", ""color"": ""#FBBF24"" } }",
        "Gross Margin Rate", "{""icon"":""chart"", ""color"":""#15803D"", ""shadow"":""#15803D"", ""trendChart"": { ""type"": ""progressBar"", ""color"": ""#4ADE80"" } }",
        "CSAT Score", "{""icon"":""users"", ""color"":""#0F766E"", ""shadow"":""#0F766E"", ""trendChart"": { ""type"": ""gauge"", ""color"": ""#5EEAD4"" } }",
        "Inventory Value", "{""icon"":""inventory"", ""color"":""#7C3AED"", ""shadow"":""#7C3AED"", ""trendChart"": { ""type"": ""area"", ""color"": ""#C4B5FD"" } }",
        "Dead Stock", "{""icon"":""box"", ""color"":""#B91C1C"", ""shadow"":""#B91C1C"", ""trendChart"": { ""type"": ""bar"", ""color"": ""#F87171"" } }",
        "Stockout Events", "{""icon"":""warning"", ""color"":""#DC2626"", ""shadow"":""#DC2626"", ""trendChart"": { ""type"": ""bar"", ""color"": ""#FCA5A5"" } }",
        "Inventory Turnover", "{""icon"":""chart"", ""color"":""#6D28D9"", ""shadow"":""#6D28D9"", ""trendChart"": { ""type"": ""line"", ""color"": ""#C4B5FD"" } }",
        "Fill Rate", "{""icon"":""box"", ""color"":""#15803D"", ""shadow"":""#15803D"", ""trendChart"": { ""type"": ""line"", ""color"": ""#86EFAC"" } }",
        "Active Employees", "{""icon"":""users"", ""color"":""#0891B2"", ""shadow"":""#0891B2"", ""trendChart"": { ""type"": ""area"", ""color"": ""#67E8F9"" } }",
        "Absenteeism Rate", "{""icon"":""warning"", ""color"":""#D97706"", ""shadow"":""#D97706"", ""trendChart"": { ""type"": ""line"", ""color"": ""#FCD34D"" } }",
        "Employee Turnover Rate", "{""icon"":""users"", ""color"":""#BE123C"", ""shadow"":""#BE123C"", ""trendChart"": { ""type"": ""line"", ""color"": ""#FDA4AF"" } }",
        "Training Completion Rate", "{""icon"":""target"", ""color"":""#0F766E"", ""shadow"":""#0F766E"", ""trendChart"": { ""type"": ""line"", ""color"": ""#99F6E4"" } }",
        "Overtime Hours", "{""icon"":""warning"", ""color"":""#EA580C"", ""shadow"":""#EA580C"", ""trendChart"": { ""type"": ""bar"", ""color"": ""#FDBA74"" } }",
        "Open Positions", "{""icon"":""users"", ""color"":""#2563EB"", ""shadow"":""#2563EB"", ""trendChart"": { ""type"": ""bar"", ""color"": ""#93C5FD"" } }",
        "On-Time Delivery", "{""icon"":""truck"", ""color"":""#15803D"", ""shadow"":""#15803D"", ""trendChart"": { ""type"": ""line"", ""color"": ""#86EFAC"" } }",
        "Fleet Efficiency", "{""icon"":""truck"", ""color"":""#1D4ED8"", ""shadow"":""#1D4ED8"", ""trendChart"": { ""type"": ""line"", ""color"": ""#93C5FD"" } }",
        "Daily Returns", "{""icon"":""box"", ""color"":""#DC2626"", ""shadow"":""#DC2626"", ""trendChart"": { ""type"": ""bar"", ""color"": ""#FCA5A5"" } }",
        "Delivery Cost per Order", "{""icon"":""money"", ""color"":""#C2410C"", ""shadow"":""#C2410C"", ""trendChart"": { ""type"": ""line"", ""color"": ""#FDBA74"" } }",
        "Avg Delivery Delay Minutes", "{""icon"":""warning"", ""color"":""#B91C1C"", ""shadow"":""#B91C1C"", ""trendChart"": { ""type"": ""line"", ""color"": ""#FCA5A5"" } }",
        // Default Fallback
        "{""icon"":""chart"", ""color"":""#475569"", ""shadow"":""#475569"", ""trendChart"": { ""type"": ""line"", ""color"": ""#CBD5E1"" } }"
    )

3. Smart HTML Insights (Reference Tooltip)

Our visual natively renders HTML. Use this measure to generate dynamic, color-coded narrative footers based on performance variance.

Nexus Insight Text Quick = 
// Note: Ensure your [Variance %] measure returns a decimal (e.g., 0.06 for 6%)
VAR VarPct = [Variance %] 

VAR SelectedKPI = SELECTEDVALUE('Nexus_Master_Dataset'[KPI_Name], "Multiple")
VAR CurrentIndustry = SELECTEDVALUE('Nexus_Master_Dataset'[Industry], "General")

// 1. Define KPIs where a lower value indicates better performance (Lower is Better)
VAR IsLowerBetter = 
    SelectedKPI IN {"Dead Stock", "Stockout Events", "Absenteeism Rate", "Daily Returns"}

// 2. Calculate actual performance status
VAR IsGoodPerformance = 
    (NOT IsLowerBetter && VarPct > 0.05) || (IsLowerBetter && VarPct < -0.05)

VAR IsBadPerformance = 
    (NOT IsLowerBetter && VarPct < -0.05) || (IsLowerBetter && VarPct > 0.05)

VAR FormattedVar = FORMAT(ABS(VarPct), "0.0%")

// 3. Generate dynamic and specialized texts for "Good Performance"
VAR GoodText = 
    SWITCH(CurrentIndustry,
        "Sales", "🚀 Strong Growth: Outstanding performance! " & SelectedKPI & " is surpassing targets by " & FormattedVar & ".",
        "Inventory", "✅ Optimized: Excellent warehouse control. " & SelectedKPI & " is better than expected by " & FormattedVar & ".",
        "HR", "🌟 Healthy Workspace: Great workforce metrics. " & SelectedKPI & " improved by " & FormattedVar & " against the baseline.",
        "Distribution", "🚚 Highly Efficient: Logistics are performing smoothly. " & SelectedKPI & " beat targets by " & FormattedVar & ".",
        "On Track: " & SelectedKPI & " is performing exceptionally well."
    )
    
// 4. Generate dynamic warning texts for "Poor Performance"
VAR BadText = 
    SWITCH(CurrentIndustry,
        "Sales", "⚠️ Action Required: " & SelectedKPI & " fell short by " & FormattedVar & ". Review recent sales trends.",
        "Inventory", "📦 Risk Alert: Supply chain warning! " & SelectedKPI & " deviated negatively by " & FormattedVar & ".",
        "HR", "👥 Attention Needed: " & SelectedKPI & " is off-target by " & FormattedVar & ". Consider immediate HR review.",
        "Distribution", "🛑 Bottleneck Detected: " & SelectedKPI & " missed the SLA by " & FormattedVar & ". Check fleet operations.",
        "Underperforming: " & SelectedKPI & " requires immediate attention."
    )
    
// 5. Text for stable state (between 5% positive and negative)
VAR NeutralText = 
    "⚖️ Stable Status: " & SelectedKPI & " in " & CurrentIndustry & " is hovering near the target (Variance: " & FORMAT(VarPct, "0.0%") & ")."

// 6. Final Output Evaluation
RETURN
    IF(
        SelectedKPI = "Multiple", 
        "Select a specific metric or day to view deep AI insights.",
        SWITCH(TRUE(),
            IsGoodPerformance, GoodText,
            IsBadPerformance, BadText,
            NeutralText
        )
    )

4. Dynamic Formatting & Units

Pass these two measures into the Dynamic Format String and Unit Label roles to allow cards in the same grid to display mixing Data Types (e.g., USD vs %).

Nexus Format String = 
VAR _KPI = [Nexus Selected KPI]
RETURN
    SWITCH (
        TRUE (),
        _KPI IN { 
            "Revenue", "Inventory Value", 
            "Delivery Cost per Order", "Average Order Value" 
        }, "#,0",
        _KPI IN { 
            "Daily Orders", "Dead Stock", "Stockout Events", 
            "Active Employees", "Overtime Hours", "Open Positions", 
            "Daily Returns", "Avg Delivery Delay Minutes" 
        }, "#,0",
        _KPI IN { 
            "Discount Rate", "Gross Margin Rate", "Absenteeism Rate", 
            "Employee Turnover Rate", "Training Completion Rate", 
            "On-Time Delivery", "Fleet Efficiency", "Fill Rate" 
        }, "0.0%",
        _KPI IN { "CSAT Score", "Inventory Turnover" }, "0.0",
        "#,0"
    )
Nexus Unit Measure = 
VAR _KPI = [Nexus Selected KPI]
RETURN
    SWITCH (
        TRUE (),
        _KPI IN { "Revenue", "Inventory Value", "Delivery Cost per Order" }, "USD",
        _KPI = "Average Order Value", "USD / Order",
        _KPI = "Daily Orders", "Orders",
        _KPI IN { 
            "Discount Rate", "Gross Margin Rate", "Absenteeism Rate", 
            "Employee Turnover Rate", "Training Completion Rate", 
            "On-Time Delivery", "Fleet Efficiency", "Fill Rate" 
        }, "%",
        _KPI = "CSAT Score", "Score",
        _KPI = "Inventory Turnover", "Turns",
        _KPI = "Stockout Events", "Events",
        _KPI = "Dead Stock", "Units",
        _KPI = "Active Employees", "Employees",
        _KPI = "Overtime Hours", "Hours",
        _KPI = "Open Positions", "Positions",
        _KPI = "Daily Returns", "Returns",
        _KPI = "Avg Delivery Delay Minutes", "Minutes",
        BLANK ()
    )

5. Conditional Border Colors

Map this to the Conditional Border Color role to group your metrics visually by domain (e.g., Sales=Blue, HR=Cyan, Inventory=Red).

Nexus Border Color = 
VAR _KPI = [Nexus Selected KPI]
RETURN
    SWITCH (
        _KPI,
        -- Sales: volume / growth / quality / pressure / health / customer
        "Revenue", "#2563EB",
        "Daily Orders", "#3B82F6",
        "Average Order Value", "#7C3AED",
        "Discount Rate", "#F59E0B",
        "Gross Margin Rate", "#16A34A",
        "CSAT Score", "#14B8A6",

        -- Inventory
        "Inventory Value", "#7C3AED",
        "Dead Stock", "#DC2626",
        "Stockout Events", "#EF4444",
        "Inventory Turnover", "#8B5CF6",
        "Fill Rate", "#16A34A",

        -- HR
        "Active Employees", "#06B6D4",
        "Absenteeism Rate", "#F59E0B",
        "Employee Turnover Rate", "#E11D48",
        "Training Completion Rate", "#14B8A6",
        "Overtime Hours", "#FB923C",
        "Open Positions", "#3B82F6",

        -- Distribution
        "On-Time Delivery", "#16A34A",
        "Fleet Efficiency", "#2563EB",
        "Daily Returns", "#EF4444",
        "Delivery Cost per Order", "#F97316",
        "Avg Delivery Delay Minutes", "#DC2626",

        -- Default Fallback
        "#64748B"
    )

# License & Activation

The visual runs in a free Community Tier by default, limited to 3 KPI categories. To unlock unlimited cards and premium support, apply the following 30-Day Evaluation Key.

Enter in: Format Pane > License & Activation

NEXUS-eyJjbGllbnQiOiJHaXRIdWJEZW1vIiwiZXhwIjoiMjAyNi0wOC0zMCJ9-114F23C