Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Cross tab column issue
NOSTALGY
<p><span style="color:#0000cd;">Hi all ,</span></p>
<p> </p>
<p> </p>
<p><span style="color:#0000cd;">I have a CUSTOMER Table ~</span></p>
<p><span style="color:#0000cd;"> </span></p>
<p><span style="color:#0000cd;">DATA LIKE THIS</span></p>
<p><span style="color:#0000cd;">CUSTOMERA MON,FEB,APR</span></p>
<p><span style="color:#0000cd;">CUSTOMERB MON,FEB,MAR,APR</span></p>
<p><span style="color:#0000cd;">CUSTOMERC MON</span></p>
<p><span style="color:#0000cd;"> </span></p>
<p><span style="color:#0000cd;"> </span></p>
<p><span style="color:#0000cd;"> </span></p>
<p><span style="color:#0000cd;">transfer to crosstable ~</span></p>
<p><span style="color:#0000cd;"> </span></p>
<p><span style="color:#0000cd;">because CustomerB MON,FEB,MAR,APR Have data</span></p>
<p><span style="color:#0000cd;"> </span></p>
<p><span style="color:#0000cd;">so ....in crosstab everyone column are also HAVE 4 COLUMN</span></p>
<p> </p>
<p> </p>
<p> MON FEB <span style="color:#ff0000;">MAR</span> APR</p>
<p>Customer A 3M 60 10 <span style="color:#ff0000;"> 0</span> 100<br>
9M 70 60 <span style="color:#ff0000;">0</span> 200<br>
1Y 80 100 <span style="color:#ff0000;"> 0</span> 300<br>
2Y 100 200 <span style="color:#ff0000;"> 0</span> 400</p>
<p> </p>
<p> </p>
<p> </p>
<p> MON FEB MAR APR</p>
<p>Customer B 3M 100 0 1 5 <br>
9M 250 100 5 10<br>
1Y 600 500 10 15<br>
2Y 1200 1800 200 20</p>
<p> </p>
<p> </p>
<p> </p>
<p> MON <span style="color:#ff0000;">FEB MAR APR</span></p>
<p>Customer C 3M 60 <span style="color:#ff0000;"> 0 0 0</span><br>
9M 70 <span style="color:#ff0000;">0 0 0</span><br>
1Y 80 <span style="color:#ff0000;"> 0 0 0</span><br>
2Y 100 <span style="color:#ff0000;"> 0 0 0</span></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p><span style="color:#0000cd;">HOW CAN I SHOW LIKE THIS FORMAT</span></p>
<p> </p>
<p><span style="color:#0000cd;">THANKS~~~~~~~~~~</span></p>
<p><span style="color:#0000cd;"> </span><br>
</p>
<p> MON FEB APR</p>
<p>Customer A 3M 60 10 100<br>
9M 70 60 200<br>
1Y 80 100 300<br>
2Y 100 200 400</p>
<p> </p>
<p> </p>
<p> MON FEB MAR APR</p>
<p>Customer B 3M 100 0 1 5 <br>
9M 250 100 5 10<br>
1Y 600 500 10 15<br>
2Y 1200 1800 200 20</p>
<p> </p>
<p> </p>
<p> MON </p>
<p>Customer C 3M 60 </p>
<p> 9M 70 </p>
<p> 1Y 80 <span style="color:#ff0000;"> </span></p>
<p> 2Y 100 <span style="color:#ff0000;"> </span></p>
Find more posts tagged with
Comments
JFreeman
<p>What version of BIRT are you using?<br>
Are these 3 separate cross tabs or a single crosstab?</p>
<p> </p>
<p>Can you attach a sample report based on a flat file data source the replicates the issue?</p>
PaulCooper
<p>To do this you need to create a table that groups by customer, then add a crosstab that is setup as you want to the header of the customer group and then filter the crosstab by the table's (Outer) customer. I have recreated your data (I assume when you had "MON" you meant January) in the file data.csv and I have made a report that does exactly what you described.</p>
<p> </p>
<p>Your category that becomes the left-hand grouping in the crosstabs ("3M", "9M", "1Y", "2Y") is not sorted as you have but if this is required that can be done by creating a computed column that converts the values to a number that is in the order you want and then you need to add that computed column to the cube as an attribute of the category grouping field. Then you can add that attribute as the sort in the crosstab.</p>