Spotfire使用自定义表达式添加多个列(Spotfire Add several columns with a custom expression)

编程入门 行业动态 更新时间:2024-10-26 14:34:33
Spotfire使用自定义表达式添加多个列(Spotfire Add several columns with a custom expression)

我想在Y中的条形图中添加几个带有自定义表达式的列。 我有几个以“HB”或“PASS”开头的列。 每次刷新桌子时,他们的号码都会改变。 但HB或PASS仍保留在列名中。

我试着用这个表达式:

Sum($map("[$csearch([pvtable],"PASS*")]",","))/Count([SUBLOT_ID])

要么

$map("[$csearch([pvtable],"PASS*")]",","))

如果我在关键字中只有一个PASS或HB列可以使用,但如果我的名字中有多个关键字列,则不行。

这是我的数据的一个例子。 他们是百分比。

LOT_ID SUBLOD_ID WL_PART_CNT PASS_HB1 PASS_HB2 HB5 HB10 HB13 HB25 Q640123 01 3841 86 11 0.25 0.5 0.25 2 Q640123 05 3841 96 3 0 1 0 0 Q640123 10 3841 80 12 0 2 4 2 Q640123 16 3841 40 50 1 1 4 4 Q640123 22 3841 85 5 9 0.5 0.5 0 Q640345 01 3841 86 11 0.25 0.5 0.25 2 Q640345 05 3841 96 3 1 0 0 0 Q640345 10 3841 80 12 0 2 4 2 Q640345 16 3841 40 50 1 1 4 4 Q640345 22 3841 85 5 9 0.5 0.5 0

我想把LOT_ID放在X中,并在Y中一起PASS。我不想为条形图上色,但我想得到这样的结果。 一个条形图,所有列都是PASS,另一个是所有列HB。

该条形图代表HB。

谢谢你的帮助,问候,劳伦特

I would like add several columns in a Bar Chart in Y with a custom expression. I have several columns which begin with "HB" or "PASS". Their number change as well as their name every time I refresh the table. But HB or PASS remains in column name.

I tried to use this expression :

Sum($map("[$csearch([pvtable],"PASS*")]",","))/Count([SUBLOT_ID])

or

$map("[$csearch([pvtable],"PASS*")]",","))

If I have only one column with PASS or HB in key word it works, but not if I have several columns with this key words in their name.

It's an example of my datas. They are in percentage.

LOT_ID SUBLOD_ID WL_PART_CNT PASS_HB1 PASS_HB2 HB5 HB10 HB13 HB25 Q640123 01 3841 86 11 0.25 0.5 0.25 2 Q640123 05 3841 96 3 0 1 0 0 Q640123 10 3841 80 12 0 2 4 2 Q640123 16 3841 40 50 1 1 4 4 Q640123 22 3841 85 5 9 0.5 0.5 0 Q640345 01 3841 86 11 0.25 0.5 0.25 2 Q640345 05 3841 96 3 1 0 0 0 Q640345 10 3841 80 12 0 2 4 2 Q640345 16 3841 40 50 1 1 4 4 Q640345 22 3841 85 5 9 0.5 0.5 0

I want to put LOT_ID in X, and PASS together in Y. I don't want to color my bar chart but I would like a result like this. One bar chart with all columns PASS and an other with all columns HB.

This bar chart represent HB.

Thank you for your help, regards, Laurent

最满意答案

你不应该需要$map函数,只需要$csearch

Sum($csearch([pvtable],"PASS*")) /Count([SUBLOT_ID])

编辑

查看测试数据后,您需要映射值。

$map("sum([$csearch([pvtable],"PASS*")])","+"),$map("sum([$csearch([pvtable],"HB*")])","+")

然后,在您的X-AXIS您将需要: <[LOT_ID] NEST [Axis.Default.Names]>

You shouldn't need the $map function, only the $csearch

Sum($csearch([pvtable],"PASS*")) /Count([SUBLOT_ID])

EDIT

After looking at your test data, you will need to map the values.

$map("sum([$csearch([pvtable],"PASS*")])","+"),$map("sum([$csearch([pvtable],"HB*")])","+")

Then, on your X-AXIS you will need: <[LOT_ID] NEST [Axis.Default.Names]>

更多推荐

本文发布于:2023-08-06 06:07:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1445283.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:多个   自定义   表达式   Spotfire   expression

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!