Creating Self-service Data Query
1. Overview
1.1. Function Entry
In the data analysis interface, click the "New Page" button in the left analysis directory tree, select "Self-service Data Query". Fill in the corresponding name, select dataset and save path, check "Enter self-service data query editing page after page creation is completed" in the lower left corner, then click OK to edit.

1.2. Interface Introduction
Guandata BI's self-service data query provides comprehensive and flexible configuration options for users to build self-service data query through four operation areas: data area, drawing area, preview area, and control/page property configuration during creation or editing. Producers can freely combine and configure these operation areas according to business needs and analysis purposes to quickly generate default effects that meet requirements.

The description of different operation areas is as follows. For specific configuration processes, please refer to the following sections.
Operation Area | Description |
Dataset Area | The dataset area is the starting point of the self-service data query function, used to select or preview datasets that need to be analyzed; to expand the flexibility of data analysis, users can create new fields based on existing fields. For details, see [《Creating Calculated Fields》](../1-Dashboard Creation/0-Basic Card Creation/0-Visualization Charts/3-Chart Configuration/1-Fields and Drawing/3-Creating New Fields.md#2-Creating Calculated Fields). |
Drawing Area | The pane control and field configuration area is the core of building self-service data query. Users can add and configure various controls (such as field panes, text panes), and adjust the layout and style of pane controls to build self-service data query that meets business needs; it also supports sorting and filtering. |
Preview Area | Used to display the final report effect. Users can preview and check the data, layout rationality, and style aesthetics of the report in this area to ensure the report fully meets preset requirements. |
Control/Page Property Configuration | After the various controls of self-service data query are built, you can make the report style more beautiful and easy to understand through control property configuration and page property configuration. |
2. Data Area
Supports dataset switching, dataset preview, creating calculated fields, creating grouped fields and other operations, similar to the data area of the chart editing page in dashboards. For reference, see [《Switching Datasets》](../1-Dashboard Creation/0-Basic Card Creation/0-Visualization Charts/3-Chart Configuration/0-Switching Datasets.md).
Moreover, to expand the flexibility of data analysis, users can create new calculated fields based on existing fields. For reference, see [《Creating Calculated Fields》](../1-Dashboard Creation/0-Basic Card Creation/0-Visualization Charts/3-Chart Configuration/1-Fields and Drawing/3-Creating New Fields.md#2-Creating Calculated Fields).
When users want to group dimension items of dimension fields or numerical fields, they can create new grouped fields based on existing fields. For reference, see [《Creating Grouped Fields》](../1-Dashboard Creation/0-Basic Card Creation/0-Visualization Charts/3-Chart Configuration/1-Fields and Drawing/3-Creating New Fields.md#3-Creating Grouped Fields).

3. Drawing Area
Pane control and field configuration is the core content of building self-service data query. Users can add and configure various controls (such as field panes, text panes) in this area according to business analysis needs, and adjust the layout and style of these controls to build self-service data query dashboards that are both business-appropriate and aesthetically pleasing.
Each type of pane as a control supports style configuration, where field panes support rule configuration and format configuration for fields (dimensions/values), and support merging/splitting of field panes.
The creation entry and configuration entry for pane controls are shown in the following figure:

3.1. Field Pane
After entering the editing page, 2 field pane controls are displayed by default. Users can create and manage more field pane controls more flexibly according to business analysis needs.
Field panes allow users to select and configure data fields. Users need to first drag fields (dimensions/values) from the "Dataset Area" to the "Field Pane", then configure and manage the selected fields, including adjusting the field order within the field pane, modifying field aliases, setting conditional formatting for fields, adjusting data formats for numerical fields, etc. These configurations will directly affect the data presentation of the report.

Guandata BI supports users to select all fields and invert selection. Click "Select All" to select all fields in the pane at once; after selecting fields, click the invert selection icon next to "Select All" to deselect currently selected fields and select all unselected fields.

Pane Configuration
Click "..." in the upper right corner of the field pane to configure all fields within the field pane, including pane style, batch field configuration, batch field deletion, and pane deletion, which will be introduced in sequence below.

1. Pane Style
You can configure the display form of fields in the field pane through "Pane Style", supporting single-column, paragraph, and dropdown styles.

2. Batch Field Configuration
Click "Batch Field Settings" to open a configuration window where you can batch select and configure aliases, alignment, field descriptions, dimension/value conversion, etc. for all fields in the field pane.
Among them, dimensions and values can be converted to each other.
Note:
1. The configuration items supported by numerical fields are different from dimension fields. Numerical fields support configuring aggregation methods and data formats.
2. In this batch configuration operation, only the properties that can be batch configured for selected fields will be displayed.

3. Batch Delete Fields
If you need to delete multiple fields in the field pane at the same time, you can click "Batch Delete Fields" to quickly delete fields.

4. Delete Pane
Click "Delete Pane" to delete the entire field pane at once. (Operation is irreversible, proceed with caution)

Field Configuration
In addition to setting all fields in the pane, you can also click on any field to configure that field individually, including operations such as converting to value, converting to dimension, setting as required, etc.
-
Convert to Value/Convert to Dimension: Numerical fields and dimension fields support mutual conversion. In different modes, corresponding configurations will differ, but the operation logic of configuration items is consistent with the field configuration in the "Card Editing Page" when drawing cards. For details, see [《Chart Drawing》](../1-Dashboard Creation/0-Basic Card Creation/0-Visualization Charts/3-Chart Configuration/1-Fields and Drawing/0-Chart Drawing.md).
-
Dimension Fields: Support displaying subtotals, setting conditional formatting, editing header format, alignment, displaying as image/hyperlink/text, field description, alias modification, etc.;
-
Numerical Fields: Support aggregation methods, subtotals and totals, advanced calculations, data formats, setting conditional formatting, editing header format, alignment, field description, alias modification, etc.
-
-
Set as Required: Set the current field as required, and users cannot uncheck it during the data extraction process.
-
Delete: Delete the current field from the field pane.

Control Properties
Click on a field pane to adjust the style in the "Control Properties" on the right, mainly including whether to automatically refresh data after changes, theme and style title, basic format, header settings, subtotals/totals, special values, title, etc. For specific descriptions, see the 4.2 Control Properties section of this article.

Merge/Split
Allows users to organize and display field panes in different ways. Users can merge field panes of the same type or with strong relevance into a merged pane (similar to the concept of group collections), thus forming a logically more cohesive collection. This merge operation can simplify interface layout and help users quickly locate and find required fields in complex analysis scenarios.
The merging or splitting of field panes does not affect the data presentation in the report preview area.
-
Merge Field Panes
Supports merging all panes or merging specified panes.
-
Merge all field panes: Merge all current field panes into one field pane.
-
Merge specified field panes: Check target panes for merging.
-

Note:
1. Merging multiple single panes will generate a new merged pane with the default style of the merged pane; if you choose to merge a single pane with a merged pane, the single pane will be added to the merged pane by default, and the merged pane style will be retained.
2. After field panes are merged, a pane title "Merged Field Panes" will be automatically generated, which users can rename;
3. If users need to add other field panes (groups) to the merged pane, they can directly click the "New Group" button in the control properties and drag the required fields to the group to complete the operation.

- Split Field Panes
Splitting field panes is to split already merged field pane groups into multiple independent panes.
Click "Split Pane" in the configuration items of the merged field pane to achieve splitting.

3.2. Text Pane
Text Input
Text panes allow users to insert custom text information in the data analysis interface. They can be used to display non-data information in report panels, such as descriptive text, titles, annotations, or indicator descriptions.
By adding text panes, users can improve the readability and understandability of reports. Information in text panes can help readers quickly understand the meaning and context behind the data.
Control Properties
Text panes support style settings for input text, including font, color, size, etc. Additionally, text panes support "jump" and "insert specific properties".

- Jump: Select the text pane, click the jump icon in advanced settings, support setting the target page for jumping. After setting, users can click to jump to the corresponding page.

-
Insert Specific Properties: Select the text pane, click the insert specific properties icon in advanced settings, support selecting specific property content to insert. After setting, the specific values will be presented in the text pane, and multiple can be inserted repeatedly:
-
Dataset: Update time, creation time;
-
Current User: Name, account, phone number, email and a series of user properties.
-

3.3. Filtering
Overview
In self-service data query, there are three places where filtering conditions can be configured: pre-filtering in the editing page, page filters, and header filtering. They are all based on detailed filtering, and the following will detail the use of the three filters.
Data filtering:
-
Default filtering (pre-filtering): Default filtering of table detail data when editing self-service data query.
-
Page filters: Page filters, if conflicting with the filter field values in the editing page, the page filters will take precedence.
-
Header filtering: Table header filtering.
Filter priority:
1. Page filters of the list ≥ header filtering ≥ pre-filtering of the editing page.
2. The self-service data query interface displays the result data of pre-filters by default. (Pre-filtering needs to be set in advance in the editing page)
3. Page filters are triggered by users, and the filtering results and conditions will override the default pre-filtering.
4. Header filtering is triggered by users, based on the data results of "page filters" and "pre-filtering of the editing page" for further filtering (the selectable options for header filtering come from the intersection of "pre-filtering of the editing page" and "page filters").


Default Filtering (Pre-filtering)
In the self-service data query editing page, click the "Default Filtering" control, drag fields from the dataset area to the default filtering bar and set filtering conditions.
When users subsequently open the self-service data query report page, the data will be automatically filtered according to the default filtering conditions preset in the editing page, showing only data records that meet the current filtering conditions.
Note:
1. Maximum 20 can be configured;
2. After setting filtering conditions, they will not be exposed when using the report. That is, in preview/use state, filtering conditions are not visible.

Page Filtering
For details, see [《Data Query Dashboard - Page Filter Operation Guide》](2-Managing Self-service Data Query.md#filters).
Header Filtering
For numerical type fields, when performing header filtering, you can switch to aggregation filtering/result filtering. For specific configuration details, please refer to the header filtering section in [《Managing Self-service Data Query》](2-Managing Self-service Data Query.md#header-filtering).
3.4. Sorting
Default Sorting
The self-service data query editing page supports setting default sorting to automatically sort report query results to meet users' specific requirements for data display order.
In the self-service data query editing page, users can click the "Default Sorting" control to select one or more fields from the field list in the dataset area as the basis for sorting. For each selected sorting field, users can further specify ascending/descending order or custom sorting.
Note:
1. Users can add one or more sorting fields (maximum 20), and set the sorting order for each of them respectively.
2. When sorting multiple fields, there is a priority relationship. First, sort the data according to the sorting rules of the first field. If the values of the first field are the same, then sort according to the sorting rules of the second field, and so on.

Advanced Sorting
Data query users can perform custom sorting on data. Click the "Advanced Sorting" button, click on the left in the popup to add as sorting fields, support ascending/descending/custom sorting of self-service data query by sorting fields.

4. Preview Area
4.1. Field Configuration
Field configuration determines the data presentation effect. The field configuration window will display currently selected fields; click field configuration to uniformly adjust selected fields, including the order of selected fields, and support row-column transposition and column dimension configuration. The configuration here is the default effect of the self-service data query dashboard.
For example, when analyzing sales data, if users may be more concerned about sales amount (B) rather than sales volume (A), they can put sales amount first to get key information faster.

4.2. Control Properties
By configuring page properties, you can make the style of self-service data query more reasonable, beautiful, and easy to understand. Main configuration items include: automatically refresh data after changes, theme and style, title, basic format, header settings, subtotals/totals, special values.
The control property configuration of self-service data query is similar to table configuration operations. For reference, see [《Chart Analysis Preview - Auto Refresh Data》](../1-Dashboard Creation/0-Basic Card Creation/0-Visualization Charts/3-Chart Configuration/2-Chart Analysis Preview.md#automatically-refresh-data-after-changes) and [《Table - Chart Properties》](../1-Dashboard Creation/0-Basic Card Creation/0-Visualization Charts/3-Chart Configuration/4-Table-Chart Properties.md) documents for quick start.
Configuration Item | Description |
Automatically Refresh Data After Changes | When field additions, deletions, modifications, filtering, sorting and other configuration changes occur, Guandata BI supports users to choose between "automatic refresh" or "manual refresh" modes for interface data through "Automatically Refresh Data After Changes" to view data. |
Theme and Style | Support configuring the theme and style of the data query table: Theme and color scheme: Provide "Classic" and "Minimalist" two themes, 5 color schemes; Provide color configuration and display setting configuration for the following properties: zebra stripes, outer borders, row-column dividers, table background color, selected highlight color. Table font and font size: Support setting the font style and font size of text in the table; Table column width: Default is automatic, that is, adapt to width according to current data content, also support users to customize fixed column width. |
Basic Format | Support configuring cell merging, alignment, automatic line wrapping, table pagination, display row numbers. |
Header Settings | Support configuring the display logic of row headers and column headers respectively and header styles (font style, background color, etc.) to facilitate user viewing. |
Table Data | Support configuring table row height, hover background color, font color of data in the table, etc. |
Subtotals/Totals | Support setting whether to display subtotals and totals and display position, aliases for subtotals/totals, fill color and font style, etc. |
Special Values | Replace special values in data (such as null values, empty strings, text null, etc.) with other text. |
Title | Support setting page title and adjusting title font style. |

5. Page Properties
After the various controls of self-service data query are built, you can complete style adjustments through "Page Properties" to make the page style more beautiful and easy to understand.
Page properties are layout and style configurations for the data query dashboard, which can set page layout (layout type, card spacing, fine adjustment) and page background configuration items.
Its configuration is similar to dashboard page style operations. For reference, see [《Page Style (Theme)》](../1-Dashboard Creation/4-Dashboard Design/2-Aesthetics Design/0-Page Style (Theme).md) document for quick start.

Additionally, the self-service data query editing state also supports flexible adjustment of the position and size of pane controls and report areas to achieve personalized layout and optimize the data viewing experience.

When the overall data query dashboard achieves the expected effect, you can save and publish it for other users to view and use.