<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Documentation – Manage Pivot Table Value Fields in Aspose.Cells for Java</title>
    <link>https://docs.aspose.com/cells/java/manage-value-fields/</link>
    <description>Recent content in Manage Pivot Table Value Fields in Aspose.Cells for Java on Documentation</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    
	  <atom:link href="https://docs.aspose.com/cells/java/manage-value-fields/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Java: Consolidation Function</title>
      <link>https://docs.aspose.com/cells/java/consolidation-function/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/java/consolidation-function/</guid>
      <description>
        
        
        &lt;h2 id=&#34;consolidation-function&#34;&gt;&lt;strong&gt;Consolidation function&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Aspose.Cells can be used to apply ConsolidationFunction to data fields (or value fields) of the pivot table. In Microsoft Excel, you can right‑click the value field and then select the &lt;strong&gt;Value Field Settings&amp;hellip;&lt;/strong&gt; option and then select the tab &lt;strong&gt;Summarize Values By&lt;/strong&gt;. From there, you can select any ConsolidationFunction of your choice, such as Sum, Count, Average, Max, Min, Product, Distinct Count, etc.&lt;/p&gt;
&lt;p&gt;Aspose.Cells provides &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/ConsolidationFunction&#34;&gt;&lt;strong&gt;ConsolidationFunction&lt;/strong&gt;&lt;/a&gt; enumeration to support the following consolidation functions.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;ConsolidationFunction.SUM&lt;/li&gt;
&lt;li&gt;ConsolidationFunction.COUNT&lt;/li&gt;
&lt;li&gt;ConsolidationFunction.AVERAGE&lt;/li&gt;
&lt;li&gt;ConsolidationFunction.MAX&lt;/li&gt;
&lt;li&gt;ConsolidationFunction.MIN&lt;/li&gt;
&lt;li&gt;ConsolidationFunction.PRODUCT&lt;/li&gt;
&lt;li&gt;ConsolidationFunction.COUNT_NUMS&lt;/li&gt;
&lt;li&gt;ConsolidationFunction.STD_DEV&lt;/li&gt;
&lt;li&gt;ConsolidationFunction.STD_DEVP&lt;/li&gt;
&lt;li&gt;ConsolidationFunction.VAR&lt;/li&gt;
&lt;li&gt;ConsolidationFunction.VARP&lt;/li&gt;
&lt;li&gt;ConsolidationFunction.DISTINCT_COUNT&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;applying-consolidationfunction-to-data-fields-of-pivot-table&#34;&gt;&lt;strong&gt;Applying ConsolidationFunction to Data Fields of Pivot Table&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;The following code applies &lt;strong&gt;AVERAGE&lt;/strong&gt; consolidation function to the first data field (or value field) and &lt;strong&gt;STD_DEV&lt;/strong&gt; consolidation function to the second data field (or value field).&lt;/p&gt;
&lt;p&gt;Sample source and output files can be downloaded from here to test the sample code:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;source.xlsx&#34;&gt;Source Excel File&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;output.xlsx&#34;&gt;Output Excel File&lt;/a&gt;&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/5876dc77e47649b66bdb5deefb4b5639.js?file=Examples-src-main-java-com-aspose-cells-examples-PivotTables-CreatePivotTable-ConsolidationFunction.java&#34;&gt;&lt;/script&gt;



&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

The Distinct Count consolidation function is supported only by Microsoft Excel 2013.
&lt;/div&gt;

&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/java?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Java: Working with data display formats of DataField in Pivot Table</title>
      <link>https://docs.aspose.com/cells/java/working-with-data-display-formats-of-datafield-in-pivot-table/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/java/working-with-data-display-formats-of-datafield-in-pivot-table/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

Aspose.Cells supports all the data display formats of DataField.
&lt;/div&gt;

&lt;h2 id=&#34;rank-smallest-to-largest-and-rank-largest-to-smallest-display-format-option&#34;&gt;&lt;strong&gt;&amp;ldquo;Rank Smallest to Largest&amp;rdquo; and &amp;ldquo;Rank Largest to Smallest&amp;rdquo; display format option&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Aspose.Cells provides the ability to set the display format option for pivot fields. For this, the API provides the &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/pivotfield#setDataDisplayFormat-int-&#34;&gt;&lt;strong&gt;PivotField.DataDisplayFormat&lt;/strong&gt;&lt;/a&gt; property. To rank largest to smallest, you may set the &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/pivotfield#setDataDisplayFormat-int-&#34;&gt;&lt;strong&gt;PivotField.DataDisplayFormat&lt;/strong&gt;&lt;/a&gt; property to &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/pivotfielddatadisplayformat#RANK-LARGEST-TO-SMALLEST&#34;&gt;&lt;strong&gt;PivotFieldDataDisplayFormat.RANK_LARGEST_TO_SMALLEST&lt;/strong&gt;&lt;/a&gt;. The following code snippet demonstrates setting the display format options.&lt;/p&gt;
&lt;p&gt;Sample source and output files can be downloaded from here for testing the sample code:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;PivotTableSample.xlsx&#34;&gt;Source Excel File&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;PivotTableDataDisplayFormatRanking_out.xlsx&#34;&gt;Output Excel File&lt;/a&gt;&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/5876dc77e47649b66bdb5deefb4b5639.js?file=Examples-src-AsposeCellsExamples-PivotTables-PivotTableDataDisplayFormatRanking-1.java&#34;&gt;&lt;/script&gt;

&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/java?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;


      </description>
    </item>
    
  </channel>
</rss>
