TablePanel: Add support for Count calculation per column or per entire dataset (#58134)

* WIP

* TablePanel: Add support for Count calculation per column or per entire dataset

* refactor

* refactor

* refactor + fixes

* refactor + tests

* Docs and cue model fix
This commit is contained in:
Victor Marin
2022-11-28 10:16:35 +02:00
committed by GitHub
parent 7ba86dc1dc
commit 16af756d50
9 changed files with 192 additions and 21 deletions
@@ -160,3 +160,15 @@ Columns with filters applied have a blue funnel displayed next to the title.
{{< figure src="/static/img/docs/tables/filtered-column.png" max-width="500px" caption="Filtered column" class="docs-image--no-shadow" >}}
To remove the filter, click the blue funnel icon and then click **Clear filter**.
## Table footer
You can use the table footer to show [calculations]({{< relref "../../calculation-types/" >}}) on fields.
After enabling the table footer, you can select your **Calculation** and select the **Fields** that should be calculated. Not selecting any field apply the calculation to all numeric fields.
### Count rows
On selecting the **Count** calculation, you will see the **Count rows** switch.
By enabling this option the footer will show the number of rows in the dataset instead of the number of values in the selected fields.