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)
Remove the default sorting in crosstab
Happy_20
Hi
Please find the attcahed report.
In all the crosstab, the group "Service Class" that displays "BE" , "Gold" , "Platinum" , "Silver" is in a sorted order by default.
I want it to be in the following order:
Platinum , Gold , Silver , BE
Please guide me how to do it
Find more posts tagged with
Comments
mwilliams
I thought I had an example for this in the devShare, but I can't find it. What you can do is create a computed column that assigns a value of 1 for platinum, 2 for gold, 3 for silver, and 4 for BE. You then add this new column as an attribute to your crosstab dimension by editing the dimension field in the dataCube editor. Then in your crosstab, you sort based on this attribute. I can make an example if needed. Let me know if you have questions.
Happy_20
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="74574" data-time="1299859059" data-date="11 March 2011 - 08:57 AM"><p>
I thought I had an example for this in the devShare, but I can't find it. What you can do is create a computed column that assigns a value of 1 for platinum, 2 for gold, 3 for silver, and 4 for BE. You then add this new column as an attribute to your crosstab dimension by editing the dimension field in the dataCube editor. Then in your crosstab, you sort based on this attribute. I can make an example if needed. Let me know if you have questions.<br /></p></blockquote>
<br />
The problem is that I can't add computed column as I am using scripted data source.<br />
I pass objects to dataset through beans and each dataset is having event handler to get the data from the service class.
mwilliams
You should still be able to add a field to your scripted dataSet in your fetch script.
Happy_20
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="74590" data-time="1299873671" data-date="11 March 2011 - 01:01 PM"><p>
You should still be able to add a field to your scripted dataSet in your fetch script.<br /></p></blockquote>
<br />
If you don't mind can you show me an example.
mwilliams
In your fetch script, you define your rows like:<br />
<br />
row["rowName"] = arrayName
.fieldName;<br />
<br />
Or something along those lines. All you'd have to do would be to add a switch statement or an if/else statement that said if (row["ServiceClass"] == "BE"){row["sortField"] = 1}, etc.<br />
<br />
Does this help?
Happy_20
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="74637" data-time="1300134634" data-date="14 March 2011 - 01:30 PM"><p>
In your fetch script, you define your rows like:<br />
<br />
row["rowName"] = arrayName
.fieldName;<br />
<br />
Or something along those lines. All you'd have to do would be to add a switch statement or an if/else statement that said if (row["ServiceClass"] == "BE"){row["sortField"] = 1}, etc.<br />
<br />
Does this help?<br /></p></blockquote>
<br />
Thanks so much. I added for loop in the event handler and added the extra field(sortColumn..that has value 1,2 ..) in the dataset. When I added that extra column for sorting property in cross tab in didnt work. So i added sortColumn dimension directly to the crosstab and made it hidden.
mwilliams
If you don't want to add it to the crosstab and hide it, you need to go into the dataCube and make the new column an attribute of the dimension you want to be sorted. Then you can sort by it without it actually being in the crosstab.
Happy_20
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="74675" data-time="1300198762" data-date="15 March 2011 - 07:19 AM"><p>
If you don't want to add it to the crosstab and hide it, you need to go into the dataCube and make the new column an attribute of the dimension you want to be sorted. Then you can sort by it without it actually being in the crosstab.<br /></p></blockquote>
<br />
I tried that, don't know why it was not working. So did the other way.<br />
Thanks so much<br />
You reply so spontaneously. I could solve major stuff in my report beacuse of you<br />
Thanks
mwilliams
Not a problem. If you want to attach a copy of your report design, I can take a look at what you did to use the "attribute" for sorting and help change it to make it work. But, if you're ok with it the way it is, I guess there's no need to change it!