【发布时间】:2016-01-04 23:08:19
【问题描述】:
需要关于 BO 4.1 中的 webi 报告的建议 对对齐感到抱歉。
我有一份报告如下:
| Country | Agent | Customer | Products |
|---|---|---|---|
| UK | Mo | Sara | Bag |
| UK | Adam | Jill | Bag |
| UK | Tim | Kim | Shoes |
| UK | Tim | Kim | Bag |
| US | John | Sam | Belt |
| US | John | Sam | Bag |
结果应该是这样的:
| Country | Agent | Customer | Products |
|---|---|---|---|
| Country | Agent | Customer | Products |
| UK | Mo | Sara | Bag |
| UK | Adam | Jill | Bag |
| UK | Tim | Kim | Shoes, Bag |
| US | John | Sam | Belt, Bag |
我有 1 个查询拉客户、产品和国家,还有另一个查询拉代理和国家。我已将代理作为与国家/地区关联的详细对象。我得到以下输出
| Country | Agent | Customer | Products |
|---|---|---|---|
| UK | Mo | Sara | Bag |
| UK | Adam | Jill | Bag |
| UK | Tim | Kim | Shoes |
| UK | Tim | Kim | Bag |
| US | John | Sam | Belt |
| US | John | Sam | Bag |
我尝试按照以下说明进行操作 http://bi.srivatsakr.com/2011/08/converting-rows-into-single-cell-comma.html
[VAR Max Products] = Max ([Products] In [Customer])
[VAR Concat Products] = [Products]+", "+Previous(Self)
[VAR Max Concat Products]= [VAR Concat Products] Where ([Products]=[VAR Max Products])
[VAR Product] = If(IsNull(Previous([VAR Max Concat Products]));Substr([VAR Max Concat Products];1;Length([VAR Max Concat Products])-2);Substr([VAR Max Concat Products];1;Pos([VAR Max Concat Products];Previous([VAR Max Concat Products]))-3))
但这给了我这样的结果
| Country | Agent | Customer | Products | [VAR Product] |
|---|---|---|---|---|
| UK | Mo | Sara | Bag | Bag |
| UK | Adam | Jill | Bag | |
| UK | Tim | Kim | Shoes, | Bag, Shoes |
| UK | Tim | Kim | Bag | |
| US | John | Sam | Belt | Bag, Belt |
| US | John | Sam | Bag |
如果我去掉Product Column,结果如下:
| Country | Agent | Customer | Products | [VAR Product] |
|---|---|---|---|---|
| UK | Mo | Sara | Bag | |
| UK | Adam | Jill | ||
| UK | Tim | Kim | ||
| UK | Tim | Kim | ||
| US | John | Sam | ||
| US | John | Sam |
我可以隐藏产品列,但它仍然不会显示正确的结果。 需要一些建议。提前感谢您的帮助。
【问题讨论】:
标签: business-objects webi