我要求制作一个缺陷的mtd pareto。我需要4列:item,qty,share%和defect%。缺陷%应该是累积百分比。很感谢任何形式的帮助。谢谢。
defect% = itemqty/total volume qty
share% = itemqty/total defect qty
(我想总结当前行的份额+上一行的份额。)
total defect itemqty 16
total volume itemqty 13
样品: item itemqty total volume qty
hardware 7 /16
Locked 5/16+sharepct of hardware
corroded 4/16+sharepct of locked
下面是一个示例数据:
month model item itemqty volumeqty
===============================================
2016(1) Jan P6 Locked 1 1
2016(1) Jan P6 Locked 1 0
2016(1) Jan P6 Locked 1 1
2016(1) Jan P6 Locked 1 1
2016(1) Jan P5 Locked 1 1
2016(1) Jan P6 hardware 1 1
2016(1) Jan P6 hardware 1 0
2016(1) Jan P6 hardware 1 1
2016(1) Jan P6 hardware 1 1
2016(1) Jan P5 hardware 1 1
2016(1) Jan P5 hardware 1 0
2016(1) Jan P5 hardware 1 1
2016(1) Jan P6 corroded 1 1
2016(1) Jan P6 corroded 1 1
2016(1) Jan P6 corroded 1 1
2016(1) Jan P5 corroded 1 1
答案 0 :(得分:0)
一个非常相似的主题讨论累积总和和百分比:
Spotfire Custom Expression : Calculate (Num/Den) Percentages
你想要使用类似的东西:
Sum(If(trim([model])="P6",[itemqty])) then Sum([Value]) over (AllPrevious([Axis.Rows]))