SAP Fiori Visual Filter
Purpose
Add chart-based filters (Bar/Line) to filter bar or value help dialog (OData V4).
MANDATORY: Gather Required Inputs First
STOP and ASK the user for ALL of these inputs if ANY are missing from the prompt:
- Entity - Which entity to add the visual filter to
- Dimension field - The field to filter by (e.g., Category, Status, Destination)
- Measure field - The numeric field to aggregate (e.g., Amount, TotalPrice, ReservationPrice)
- Aggregation method - How to aggregate: sum, avg, min, or max
- Chart type - Bar or Line (recommend Bar as default)
DO NOT proceed with implementation until all inputs are confirmed.
CAP Implementation
Enable Aggregation (MANDATORY)
Aggregated Property (Measure)
Chart Annotation
✅ Uses DynamicMeasures
PresentationVariant
ValueList (on Dimension Field)
SelectionFields
ABAP RAP Implementation
- Aggregation.ApplySupported and Aggregation.CustomAggregate annotations must be available in metadata.xml (RAP). If not, below backend configuration is required.
Backend CDS (MANDATORY)
Chart Annotation
✅ Uses Measures (not DynamicMeasures)
❌ Metadata is read-only
PresentationVariant Annotation
ValueList Annotation
SelectionFields Annotation
Manifest Configuration (REQUIRED)
✅ Connects filter field to visual filter chart
✅ Sets initial layout to visual mode
Testing
CAP Projects
RAP Projects
- Consult fiori mcp server if available on how to refresh metadata for sap/cloud systems in case of RAP
Key Differences
- CAP: DynamicMeasures + AggregatedProperty defined in CDS
- RAP: Measures + @Aggregation.default in backend CDS only
- CAP: Aggregation and chart defined in same place
- RAP: Metadata is read-only, must be configured in backend CDS.
- Qualifier: Must use same qualifier (#visualFilter) across Chart, ValueList, and manifest
Common Mistakes
- Missing backend aggregation setup
- Qualifier mismatch between Chart, ValueList, PresentationVariant, and manifest
- Wrong path in manifest (use full vocabulary path)
- RAP projects using DynamicMeasures instead of Measures
- Forgetting PresentationVariantQualifier in ValueList
- Missing SelectionFields annotation
Best Practices
- Use Bar chart (most common and recommended)
- Limit to 3–5 visual filters per filter bar
- Always configure backend aggregation first
- Use consistent qualifiers throughout
- Test with real data to verify aggregation works correctly


