Splitting the KPI row into Validation level Metrics and Duplication level Metrics creates a clean, transparent distinction between statutory checks and duplication screening.
To align the Jurisdiction Wise Audit Summary (left) and the Inspection Details (right) so they provide unambiguous metrics for both gates, follow these updates.
1. Update the Left Summary Cards (gal_CountryBreakdown)
Each country card should display both validation and duplication counts simultaneously instead of a single ambiguous line.
Select the subtitle label inside the template of gal_CountryBreakdown and update its Text property:
With(
{
_total: CountRows(Filter(hcl_invoice_uploads, batchId = varBatchId, countryCode = ThisItem.Value)),
_valPass: CountRows(Filter(hcl_invoice_uploads, batchId = varBatchId, countryCode = ThisItem.Value, 'Validation Status' = "Pass")),
_dupClean: CountRows(Filter(hcl_invoice_uploads, batchId = varBatchId, countryCode = ThisItem.Value, duplicationStatus = "New Record Created"))
},
Text(_total, "#,##0") & " Inv • Valid: " & Text(_valPass, "#,##0") & " • Unique: " & Text(_dupClean, "#,##0")
)
Visual Preview on the card:
* Bulgaria: 2 Inv • Valid: 1 • Unique: 0
* Portugal: 1 Inv • Valid: 1 • Unique: 0
* SWEDEN: 1 Inv • Valid: 1 • Unique: 0
2. Update Inspection Details (Right Side Badges)
Replace the 2-badge container inside gal_invoice_health / con_audit_health with a 2x2 Inspection Matrix or 4 horizontal pills so both Pass and Fail counts are visible for both checks.
Set con_audit_health to Wrap: true (or place two horizontal containers) with 4 badges:
Pillar A: Statutory Validation
* Validation Pass Badge (Green):
* Text:
"Val Pass: " & Text(
CountRows(
Filter(
hcl_invoice_uploads,
batchId = varBatchId,
countryCode = gal_CountryBreakdown.Selected.Value,
'Validation Status' = "Pass"
)
),
"#,##0"
)
* Fill: ColorValue("#DCFCE7"), Color: ColorValue("#16A34A")
* Validation Fail Badge (Red):
* Text:
"Val Fail: " & Text(
CountRows(
Filter(
hcl_invoice_uploads,
batchId = varBatchId,
countryCode = gal_CountryBreakdown.Selected.Value,
'Validation Status' = "Fail"
)
),
"#,##0"
)
* Fill: ColorValue("#FEE2E2"), Color: ColorValue("#DC2626")
Pillar B: Duplication Screening
* Unique Badge (Green):
* Text:
"Unique: " & Text(
CountRows(
Filter(
hcl_invoice_uploads,
batchId = varBatchId,
countryCode = gal_CountryBreakdown.Selected.Value,
duplicationStatus = "New Record Created"
)
),
"#,##0"
)
* Fill: ColorValue("#DCFCE7"), Color: ColorValue("#16A34A")
* Duplicate / Discarded Badge (Red):
* Text:
"Duplicate: " & Text(
CountRows(
Filter(
hcl_invoice_uploads,
batchId = varBatchId,
countryCode = gal_CountryBreakdown.Selected.Value,
duplicationStatus <> "New Record Created"
)
),
"#,##0"
)
* Fill: ColorValue("#FEE2E2"), Color: ColorValue("#DC2626")
Step 3: Populate the Inspection Table Below the Badges
Directly beneath these 4 badges inside the right panel, add a vertical gallery (gal_CountryInvoiceDetails):
* Items:
Filter(
hcl_invoice_uploads,
batchId = varBatchId,
countryCode = gal_CountryBreakdown.Selected.Value
)
Within each item of this gallery, display:
* File/Invoice Name: ThisItem.cr1e9_invoicenumber (or ThisItem.'File Name')
* Validation Status Tag: ThisItem.'Validation Status' (Pass/Fail)
* Duplication Status Tag: ThisItem.duplicationStatus
* Validation Reason: ThisItem.'Validation Summary'
Selecting SWEDEN will clearly display: Val Pass: 1 | Val Fail: 0 alongside Unique: 0 | Duplicate: 1, direc
tly clarifying that while tax/format validation passed, the invoice was discarded as a duplicate.⚠️Content was pasted as plain text and auto-formatted as a code block. Use the Code Block button in the editor for proper formatting.