This is a migrated thread and some comments may be shown as answers.

# How we can SubTotal Percent

2 Answers 121 Views
PivotGrid
Top achievements
Rank 1
Abdullah asked on 26 Nov 2013, 10:32 AM
Hi everybody,

I want see sub total percent according to sub total.

how can i calculate sub total's items percent according to sub total.

In this picture true calculating

http://t1311.hizliresim.com/1h/u/uwq44.gif

NeedDataSource Code
(
var aktifler = from bs in PredicaFinansContext.APV_PRE_BILANCO_SIRKET
where bs.Yil == yil && bs.Donem == donem && bs.Ay == ay &&
(bs.Tur.StartsWith("AKTİF") || bs.Tur.StartsWith("aktif"))
select new
{
//bs.Sirket,
bs.Anakod,
bs.Tur,
bs.GrupKod,
bs.Donem,
bs.Yil,
bs.Tutar
};

)

(
AllowFiltering="true"

EmptyValue="0"

EnableToolTips="True" Width="100%" Height="500px"
TotalsSettings-ColumnGrandTotalsPosition="None"
TotalsSettings-ColumnsSubTotalsPosition="None"
TotalsSettings-RowGrandTotalsPosition="None"
TotalsSettings-RowsSubTotalsPosition="Last"
Culture="tr-TR" ErrorValue="#" Font-Bold="False"

<ClientSettings EnableFieldsDragDrop="true">
<ClientEvents OnToolTipShow="toolTipShow" />
<Scrolling AllowVerticalScroll="true" />
</ClientSettings>

<Fields>
<telerik:PivotGridReportFilterField DataField="GrupKod" IsHidden="True">
</telerik:PivotGridReportFilterField>

<telerik:PivotGridRowField DataField="Sirket">
</telerik:PivotGridRowField>
<telerik:PivotGridRowField DataField="Tur">
</telerik:PivotGridRowField>
<telerik:PivotGridRowField DataField="Anakod">
</telerik:PivotGridRowField>
<telerik:PivotGridRowField DataField="GrupKod">
</telerik:PivotGridRowField>

<%-- HESAPLI ALANLAR --%>
<telerik:PivotGridAggregateField Aggregate="Sum" DataField="Tutar" DataFormatString="{0:#,##0} TL" Caption="Tutar">
<asp:Label ID="Label1" runat="server" >
Tutar
</asp:Label>

</telerik:PivotGridAggregateField>

<%-- GRUB YUZDE --%>
<telerik:PivotGridAggregateField Aggregate="Sum" DataField="Tutar" Caption="Grub Yüzde" GrandTotalAggregateFormatString="{0:P}" TotalFormatString="{0:P}">
<TotalFormat TotalFunction="PercentOfRowTotal" Axis="Columns"  />
<asp:Label ID="Label1" runat="server" Text="Grub %"></asp:Label>
<RowGrandTotalCellTemplate>
<asp:Label ID="Label1" runat="server" Text="RowGrandTotalCellTemplate"></asp:Label>
</RowGrandTotalCellTemplate>
</telerik:PivotGridAggregateField>

<%-- GENEL YÜZDE --%>
<telerik:PivotGridAggregateField Aggregate="Sum" DataField="Tutar" Caption="Genel Yüzde" GrandTotalAggregateFormatString="{0:P}" TotalFormatString="{0:P}">
<TotalFormat TotalFunction="PercentOfGrandTotal" Axis="Columns" Level="0" />
<asp:Label ID="Label1" runat="server" Text="Genel %"></asp:Label>

</telerik:PivotGridAggregateField>
</Fields>
<ClientSettings EnableFieldsDragDrop="true">
<ClientMessages DragToReorder="Sürükle Bırak Alanı"></ClientMessages>
</ClientSettings>
)

## 2 Answers, 1 is accepted

0
Vasil
Telerik team
answered on 28 Nov 2013, 11:43 AM
Hello Abdullah,

From our next release we will provide functionality for calculated fields and items.
But with the current version, your requirements can not be fully implemented.

Regards,
Vasil
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Abdullah
Top achievements
Rank 1
answered on 28 Nov 2013, 02:29 PM

I wait the next release..

You can get ideas excel 2013 pivotgrid.

Tags
PivotGrid