<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.openoffice.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ztevepowell</id>
	<title>Apache OpenOffice Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.openoffice.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ztevepowell"/>
	<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/wiki/Special:Contributions/Ztevepowell"/>
	<updated>2026-05-13T06:28:02Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.14</generator>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Talk:Documentation/How_Tos/Calc:_Database_functions&amp;diff=106561</id>
		<title>Talk:Documentation/How Tos/Calc: Database functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Talk:Documentation/How_Tos/Calc:_Database_functions&amp;diff=106561"/>
		<updated>2009-01-07T14:59:52Z</updated>

		<summary type="html">&lt;p&gt;Ztevepowell: /* Putting parameters in criteria */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My question is :&lt;br /&gt;
&lt;br /&gt;
How to filter a database in Calc to include rows between two dates, where an earleir date than today is already defined in the spreadsheet?&lt;br /&gt;
&lt;br /&gt;
TIA&lt;br /&gt;
&lt;br /&gt;
Nicolas Beaudet&lt;br /&gt;
&lt;br /&gt;
== Putting parameters in criteria ==&lt;br /&gt;
&lt;br /&gt;
The way to have variable criteria is to put calculated expressions in the criteria range. For example:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &lt;br /&gt;
! A&lt;br /&gt;
! B&lt;br /&gt;
! C&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| ColA&lt;br /&gt;
|                  &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| = &amp;quot;&amp;lt;&amp;quot; &amp;amp; C2&lt;br /&gt;
| &lt;br /&gt;
| 42&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The criteria range is A1:A2, selecting the rows for which the value in column &amp;quot;ColA&amp;quot; is less than the value in C2 (42 in this case).&lt;br /&gt;
&lt;br /&gt;
So if the database rows are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &lt;br /&gt;
! X&lt;br /&gt;
! Y&lt;br /&gt;
! Z&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| ColA&lt;br /&gt;
| ColB                 &lt;br /&gt;
| ColC&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| 41&lt;br /&gt;
| 100&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| 43&lt;br /&gt;
| 1&lt;br /&gt;
| 200&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
then the expression:  =DSUM(X12:Z14; &amp;quot;ColC&amp;quot;; A1:A2)  will calculate the value 2. &lt;br /&gt;
&lt;br /&gt;
If the value of cell C2 (the parameter value for the criteria) is changed to 44, the result will be 202.&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;m not sure if the description proposed on this page shouldn&amp;#039;t be enhanced to explain this.&lt;br /&gt;
&lt;br /&gt;
--[[User:Ztevepowell|Zteve]] 15:59, 7 January 2009 (CET)&lt;/div&gt;</summary>
		<author><name>Ztevepowell</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Talk:Documentation/How_Tos/Calc:_Database_functions&amp;diff=106559</id>
		<title>Talk:Documentation/How Tos/Calc: Database functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Talk:Documentation/How_Tos/Calc:_Database_functions&amp;diff=106559"/>
		<updated>2009-01-07T14:58:55Z</updated>

		<summary type="html">&lt;p&gt;Ztevepowell: New section: Putting parameters in criteria&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My question is :&lt;br /&gt;
&lt;br /&gt;
How to filter a database in Calc to include rows between two dates, where an earleir date than today is already defined in the spreadsheet?&lt;br /&gt;
&lt;br /&gt;
TIA&lt;br /&gt;
&lt;br /&gt;
Nicolas Beaudet&lt;br /&gt;
&lt;br /&gt;
== Putting parameters in criteria ==&lt;br /&gt;
&lt;br /&gt;
The way to have variable criteria is to put calculated expressions in the criteria range. For example:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &lt;br /&gt;
! A&lt;br /&gt;
! B&lt;br /&gt;
! C&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| ColA&lt;br /&gt;
|                  &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| = &amp;quot;&amp;lt;&amp;quot; &amp;amp; C2&lt;br /&gt;
| &lt;br /&gt;
| 42&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The criteria range is A1:A2, selecting the rows for which the value in column &amp;quot;ColA&amp;quot; is less than the value in C2 (42 in this case).&lt;br /&gt;
&lt;br /&gt;
So if the database rows are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &lt;br /&gt;
! X&lt;br /&gt;
! Y&lt;br /&gt;
! Z&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| ColA&lt;br /&gt;
| ColB                 &lt;br /&gt;
| ColC&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| 41&lt;br /&gt;
| 100&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| 43&lt;br /&gt;
| 1&lt;br /&gt;
| 200&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
then the expression:  =DSUM(X12:Z14; &amp;quot;ColC&amp;quot;; A1:A2)  will calculate the value 2. &lt;br /&gt;
&lt;br /&gt;
If the value of cell C2 (the parameter value for the criteria) is changed to 44, the result will be 202.&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;m not sure if the description proposed on this page shouldn&amp;#039;t be enhanced to explain this.&lt;/div&gt;</summary>
		<author><name>Ztevepowell</name></author>
	</entry>
</feed>