@extends('layouts.demo10.base') @section('content')

{{ $logicId }}

Pivot Table View

← Back to Pivots
@php $metricIds = $pivot['metric_ids'] ?? []; $colHeaders = $pivot['col_headers'] ?? []; $matrix = $pivot['matrix'] ?? []; $hasCols = !empty($pivot['col_key'] ?? null); $queryError = $queryError ?? null; @endphp @if($queryError)
Pivot query failed
{{ $queryError }}
@elseif(empty($matrix))
No data available
No data returned for this pivot.
Check joins, columns and filters in dashboard_builder.json.
@else
@if($hasCols) @foreach($colHeaders as $ch) @endforeach @else @foreach($metricIds as $mId) @endforeach @endif @if($hasCols) @foreach($colHeaders as $ch) @foreach($metricIds as $mId) @endforeach @endforeach @endif @foreach($matrix as $rowLabel => $cols) @if($hasCols) @foreach($colHeaders as $ch) @foreach($metricIds as $mId) @endforeach @endforeach @else @foreach($metricIds as $mId) @endforeach @endif @endforeach
{{ $pivot['row_key'] ?? 'Category' }} {{ $ch ?: '(blank)' }} {{ $mId }}
{{ $mId }}
{{ $rowLabel ?: '(blank)' }} {{ $cols[$ch][$mId] ?? 0 }} {{ $cols['__single__'][$mId] ?? 0 }}
Showing {{ count($matrix) }} row{{ count($matrix) === 1 ? '' : 's' }} @if($hasCols) × {{ count($colHeaders) }} column group{{ count($colHeaders) === 1 ? '' : 's' }} @endif
@endif
@endsection