You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Spotfire中如何按指定范围对列内任务值进行分组?

How to Create Overlapping Task Groups in Spotfire

Got it, let's tackle this overlapping grouping problem—since your tasks span multiple months (like Task 3 belongs to both September and October), a simple single-value grouping won't cut it. Here's how to set this up properly:

Step 1: Build a Calculated Column for Multi-Month Assignments

First, we'll create a calculated column that lists all applicable months for each task. This lets tasks belong to multiple groups instead of just one.

  1. Go to Data > Add Calculated Column
  2. Name the column something like Task Month Groups
  3. Paste this expression (adjust task number ranges if needed):
Concatenate(
  If([Task] >= 1 AND [Task] <= 5, "September;", ""),
  If([Task] >= 3 AND [Task] <= 7, "October;", ""),
  If([Task] >= 5 AND [Task] <= 9, "November;", "")
)
  1. Critical: Set the column's data type to List (String). To do this:
    • Right-click the new column in the Data panel
    • Select Column Properties > Data Type
    • Choose List (String) and set the delimiter to ; (matches the semicolons in our expression)

This generates a list of months for each task—for example, Task 5 will show September;October;November, Task 3 will show September;October, etc.

Step 2: Use the Group Column for Visualizations or Analysis

Now you can use this column to group your data in two common ways:

Option A: Group with Multi-Value Lists

If you want to see tasks grouped by all their applicable months at once (e.g., a bar chart showing counts of tasks per combined month group), just drag the Task Month Groups column into your visualization's grouping axis.

Option B: Split into Separate Rows for Each Month

If you need each task to appear in every month group it belongs to (e.g., Task 3 shows up in both September and October rows), use the Unpivot tool:

  1. Go to Data > Transform Data > Unpivot
  2. Select the Task Month Groups column
  3. Choose to split by the list delimiter (;)
  4. Spotfire will create a new row for each month assigned to a task, making it easy to analyze each group independently.

Bonus: Quick Grouping in Visualizations (No Calculated Column)

If you only need the grouping for a single visualization, you can use a custom expression directly in the grouping axis:

Case
  When [Task] Between 1 And 5 Then "September"
  When [Task] Between 3 And 7 Then "October"
  When [Task] Between 5 And 9 Then "November"
End

Note: This will only assign the first matching month to each task, so it's better for non-overlapping needs. Stick with the calculated list column for overlapping groups.


内容的提问来源于stack exchange,提问作者BULB

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 06:50:57