Filter Setting Segmentation Linkage with Cards
Applicable Scenarios
Need to set partitions/divide interval segments for data in tables, and filter card data according to the set groups/interval segments.
【Tip】: Newly created grouping fields in filters are text parameters when passed, and cannot automatically judge table data.
Scenario One: Numerical Interval Grouping
Create a new selection filter, set the linkage field to "New Field/New Grouping Field", and customize segment intervals

Requirement: The filter controls the display of table data by filtering the "Quantity Summary" field in the card (expected result display as shown in the figure below).

Solution 1: You can create a new calculated field in the card to mark the data to be filtered by intervals
-
Create a new calculated field "Partition Identifier" in the card
case
when [Quantity Summary] >= 0 and [Quantity Summary] <= 999 then 'Less than 1000'
when [Quantity Summary] >= 1000 and [Quantity Summary] <= 10000 then '1000-10000'
else 'Others'
end
- Set the filter to link with the "Partition Identifier" field in the card

Solution 2: Reference global parameters in the card and create a new calculated field, drag to the filter bar
- Create a new calculated field "Interval Parameter" in the card, introducing a text-type global parameter.

- Create a new filter field "Filter", field type as boolean, place in the filter bar.
case when [Interval Parameter] = 'Less than 1000' then [Quantity Summary] <= 999 and [Quantity Summary] >= 0
when [Interval Parameter] = 'Others' then [Quantity Summary] < 0 or [Quantity Summary] > 10000
else [Quantity Summary] >= int(split([Interval Parameter],'-')[0]) and [Quantity Summary] <= int(split([Interval Parameter],'-')[1]) end

- Set the filter to link with the global parameter referenced in the card.

Solution 3: Create a new grouping field in the card and link with the filter's grouping field
- Create a new grouping field "Grouping Field" in the card, set custom step size

- Set the filter to link with this newly created grouping field

【Notes】
When the filter has "Show All" option checked and the filter item is "All", Solution 2 won't take effect (manifested as: card data is empty)

Scenario Two: Text Value Grouping
Create a new selection filter, set the linkage field to "New Field/New Grouping Field", and divide grouping content

Selection filter: The set segment intervals are as follows.
Requirement: The filter controls the display of table data by filtering the "Product Category" field in the card.

Solution 1: You can create a new calculated field in the card to mark the data to be filtered by intervals
- Create a new calculated field "Grouping Identifier"
case
when [Product Category] in ('Food Category','Tobacco and Alcohol Category','Milk Powder Category','Tobacco and Alcohol Category','Beverage Category','Mooncake Category')
then 'Food Major Category'
when [Product Category] not in ('Food Category','Tobacco and Alcohol Category','Milk Powder Category','Tobacco and Alcohol Category','Beverage Category','Mooncake Category')
then 'Others'
end

- Set the filter to link with the "Grouping Identifier" field in the card

Solution 2: Reference text global parameters in the card
- Create a new calculated field "Text Parameter" in the card, introducing a text-type global parameter.

- Create a new filter field "Filter", field type as boolean, place in the filter bar.
case
when [Text Parameter] = 'Food Major Category'
then [Product Category] in ('Food Category','Tobacco and Alcohol Category','Milk Powder Category','Tobacco and Alcohol Category','Beverage Category','Mooncake Category')
when [Text Parameter] = 'Others'
then [Product Category] not in ('Food Category','Tobacco and Alcohol Category','Milk Powder Category','Tobacco and Alcohol Category','Beverage Category','Mooncake Category')
else [Product Category] in ('Food Category','Tobacco and Alcohol Category','Milk Powder Category','Tobacco and Alcohol Category','Beverage Category','Mooncake Category','Cosmetics Category','Kitchen Ingredients','Daily Necessities Category','Medicine Category','Maternal and Child Products')
end

- Set the filter to link with the global parameter referenced in the card.

Solution 3: Create a new grouping field in the card and link with the filter's grouping field
- Create a new grouping field "Product Major Category" in the card

- Set the filter to link with this newly created grouping field

【Notes】
Different from the numerical interval grouping scenario, all 3 solutions above can filter "All" content, and the results of the 3 solutions are consistent.
