ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Pivot Table functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Warning
From version 26, PVTComparePeriod is kept for backward compatibility. This function has been replaced with PVTCompareDateRange.
Calculates and displays a date range comparison in a Pivot Table control.
Example
// Compare 1st quarters 2018 to 2020
sDateRange is string 
FOR nYear = 2018 TO 2020
	// from January 1 (0101) to March 31 (0331)
	sDateRange += [CR] + "" + nYear + "0101" + TAB + nYear + "0331"
END
PVTCompareDateRange(PVT_Sales, sDateRange, pvtAbsoluteEvolution + pvtPercentageEvolution)
Syntax
PVTCompareDateRange(<Pivot Table control> , <Range> , <Display mode>)
<Pivot Table control>: Control name
Name of the Pivot Table control to be used.
<Range>: Character string
Date ranges to compare. This parameter has the following format:
<Min date Range 1> + TAB + <Max date Range 1> + CR + ...
<Min date Range N> + TAB + <Max date Range N>
where:
  • <Min date Range> corresponds to the minimum date of the range,
  • <Max date Range> corresponds to the minimum date of the range.
The date ranges must be in the same order (ascending or descending) as the date dimensions.
<Display mode>: Integer constant
Specifies whether the evolution must be displayed as a percentage and/or absolute values:
pvtAbsoluteEvolutionShows the evolution between date ranges as absolute values.
This constant can be combined with the pvtPercentageEvolution constant.
pvtPercentageEvolutionShows the evolution between date ranges as a percentage.
This constant can be combined with the pvtAbsoluteEvolution constant.
pvtWithoutEvolution
(Default value)
Does not show the evolution between date ranges.
Remarks
  • This function is used to compare date ranges. It is equivalent to "Compare date ranges", an Automatic Application Feature (AAF) in the context menu of the Pivot Table control. For more details, see Automatic features of Pivot Table controls.
  • The Pivot Table control must not be empty, otherwise the function will have no effect.
Business / UI classification: UI Code
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/25/2024

Send a report | Local help