Hi Gisela,
The reported issue occurs due to the PivotViewFormatSettings
and PivotViewCalculatedField are defined outside of the PivotViewDataSourceSettings
tag, while they should be used inside of that tag instead. Please refer the
code snippet below.
Code Example:
<SfPivotView TValue="ExpandoObject" Height="560" Width="100%" AllowCalculatedField=true>
<PivotViewDataSourceSettings DataSource="@Orders">
<PivotViewFormatSettings>
<PivotViewFormatSetting
Name="Freight" Format="N0" UseGrouping="false" ></PivotViewFormatSetting>
<PivotViewFormatSetting
Name="FreightAdd" Format="N0" UseGrouping="false"></PivotViewFormatSetting>
</PivotViewFormatSettings>
<PivotViewCalculatedFieldSettings>
<PivotViewCalculatedFieldSetting Name="FreightAdd" Formula="@f_add"></PivotViewCalculatedFieldSetting>
</PivotViewCalculatedFieldSettings>
</PivotViewDataSourceSettings>
</SfPivotView>
|
Meanwhile, we have modified your
sample for your reference.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Syncfusion_Pivot-630089751
Please see the below UG document for more information on
the PivotViewFormatSettings and PivotViewCalculatedField property.
PivotViewFormatSettings: https://blazor.syncfusion.com/documentation/pivot-table/number-formatting
PivotViewCalculatedField: https://blazor.syncfusion.com/documentation/pivot-table/calculated-field
Please let us know if you have any concerns.
Regards,
Angelin Faith Sheeba