The link below from IBM demonstrated a solution to resolve this issue. However, it could be very slow duo to master detail relationship. in addition, it is not flexible at all. This article shows you another practical way to resolve this issue at Query level.
https://www.ibm.com/support/pages/how-combine-rows-list-report-single-row-comma-separated How to combine rows in a list report into a single row that is comma separated.
https://www.ibm.com/support/pages/how-combine-rows-list-report-single-row-comma-separated How to combine rows in a list report into a single row that is comma separated.
Report output
| ||||||||||
Basic Data
| Column1 | Column2 | Measure1 | Rank4Column2 | DistinctCount4Column2 | Column21 | Column22 | Column23 | Column24 | Column25 |
CTL 309306 | IS-510977 | 10 | 2 | 2 | IS-510977 | |||||
CTL 309316 | IS-510979 | 10 | 2 | 2 | IS-510979 | |||||
CTL 309316 | IS-510980 | 10 | 1 | 2 | IS-510980 | |||||
CTL 309306 | IS-511129 | 10 | 1 | 2 | IS-511129 | |||||
Report Data | Column1 | ConcatenationOfColumn2 | Measure1 | |||||||
CTL 309306 | IS-511129;IS-510977 | 20 | ||||||||
CTL 309316 | IS-510980;IS-510979 | 20 | ||||||||
Report columns | ||||||||||
Rank4Column2 | rank ( [Column2] for [Column1]) | |||||||||
DistinctCount4Column2 | count( distinct [Column2] for [Column1]) | |||||||||
Column21 | if ([Rank4Column2] = 1) THEN ([Column2]) ELSE (null) | |||||||||
Column22 | if ([Rank4Column2] = 2) THEN ([Column2]) ELSE (null) | |||||||||
Column23 | if ([Rank4Column2] = 3) THEN ([Column2]) ELSE (null) | |||||||||
Column24 | if ([Rank4Column2] = 4) THEN ([Column2]) ELSE (null) | |||||||||
Column25 | if ([Rank4Column2] = 5) THEN ([Column2]) ELSE (null) | |||||||||
ConcatenationOfColumn2 - CALCULATED | CASE
WHEN maximum([BasicData].[DistinctCount4Column2]) = 1 THEN
maximum([BasicData].[Column21]) WHEN maximum([BasicData].[DistinctCount4Column2]) = 2 THEN maximum([BasicData].[Column21]) || ';' || maximum([BasicData].[Column22]) WHEN maximum([BasicData].[DistinctCount4Column2]) = 3 THEN maximum([BasicData].[Column21]) || ';' || maximum([BasicData].[Column22]) || ';' || maximum([BasicData].[Column23]) WHEN maximum([BasicData].[DistinctCount4Column2]) = 4 THEN maximum([BasicData].[Column21]) || ';' || maximum([BasicData].[Column22]) || ';' || maximum([BasicData].[Column23]) || ';' || maximum([BasicData].[Column24]) WHEN maximum([BasicData].[DistinctCount4Column2]) = 5 THEN maximum([BasicData].[Column21]) || ';' || maximum([BasicData].[Column22]) || ';' || maximum([BasicData].[Column23]) || ';' || maximum([BasicData].[Column24]) || ';' || maximum([BasicData].[Column25]) END | |||||||||
No comments:
Post a Comment