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)
Grouping Multiple columns
jborunda
<p>I have the following report</p>
<p> </p>
<p>Plan Strategy Project</p>
<p>
</p>
<p>Plan 1 Strategy 1 Project 1</p>
<p>Plan 1 Strategy 2 Project 1</p>
<p>Plan 1 Strategy 3 Project 1</p>
<p>Plan 2 Strategy 4 Project 2</p>
<p>Plan 3 Strategy 5 Project 3</p>
<p>Plan 4 Strategy 6 Project 4</p>
<p>Plan 4 Strategy 6 Project 5</p>
<p> </p>
<p>where I want to group each column to display one instance of each (Plan, Strategy and Project) as follows:</p>
<p> </p>
<p>Plan Strategy Project</p>
<p>
</p>
<p>Plan 1 Strategy 1 Project 1</p>
<p> Strategy 2 </p>
<p> Strategy 3 </p>
<p> </p>
<p>Plan 2 Strategy 4 Project 2</p>
<p> </p>
<p>Plan 3 Strategy 5 Project 3</p>
<p> </p>
<p>Plan 4 Strategy 6 Project 4</p>
<p> Project 5</p>
<p> </p>
<p>I was able to group them but I had to create 3 different group instances and the columns where skewed, one under another and it is difficult to follow where the info belongs.</p>
<p> </p>
<p>Plan</p>
<p> Strategy</p>
<p> Project</p>
<p> </p>
<p>Also, I have a prompt window with an "All" function. I tried creating 3 different tables for each columns, which it worked when I select one instance at a time but when I select "All" the tables are off. </p>
<p>I've struggled for quite a while only being able to group one column, hopefully someone can give some pointers as how to tackle this problem.</p>
<p> </p>
<p>Thanks,</p>
<p> </p>
<p>Jorge</p>
Find more posts tagged with
Comments
pricher
<p>Hi Jorge,</p>
<p> </p>
<p>Based on what you are showing, you don't need grouping. One way to handle your scenario would be to sort the data on Plan, Strategy and Project (either in the query or at the table level) and use the Suppress Duplicates property of each column in the table. You can find that property by clicking on the column header of the table, going to Property --> General, and checking the Suppress Duplicates box.</p>
<p> </p>
<p>I am sending you an example based on your data in an Excel spreadsheet.</p>
<p> </p>
<p>Enjoy!</p>
<p> </p>
<p>P.</p>
jborunda
<p>Hi pricher,</p>
<p> </p>
<p>Thank you for your response and it works to a certain point... I did select Suppress Duplicates on all the columns as you suggested but I realized when there's a duplicate value next to each other, eventhough different values on another column, it suppresses that value. </p>
<p> </p>
<p>Plan Strategy Project</p>
<p>
</p>
<p>Plan 1 Strategy 1 Project 1</p>
<p>Plan 1 Strategy 2 Project 1</p>
<p>Plan 1 Strategy 3 Project 1</p>
<p>Plan 2 Strategy 4 Project 2</p>
<p>Plan 3 Strategy 4 Project 3</p>
<p> </p>
<p>After selecting "Suppress Duplicates" on all columns, this is what I get</p>
<p> </p>
<p>Plan Strategy Project</p>
<p>
</p>
<p>Plan 1 Strategy 1 Project 1</p>
<p> Strategy 2</p>
<p> Strategy 3</p>
<p>Plan 2 Strategy 4 Project 2</p>
<p>Plan 3 Project 3</p>
<p> </p>
<p>**Notice that Plan 2 and 3 share the same Strategy 4 but when I suppress duplicates, Strategy 4 in Plan 3 is not shown....</p>
<p> </p>
<p>Is there a reason why it is not shown???</p>
<p> </p>
<p>Thank you,</p>
<p> </p>
<p>Jorge</p>
pricher
<p>Hi,</p>
<p> </p>
<p>Sorry for the late reply... Got busy....</p>
<p> </p>
<p>I am sending you a new example that should solve your problem. This time, instead of using the Suppress Duplicates property, I am using the Visibility property of the Plan and Strategy data item.</p>
<p> </p>
<p>The first step is to read ahead all the values for Plan and Strategy and keep them in two arrays, keepPlan and keepStrategy. This is done on the onCreate method of the detail row of the first table. Notice that this table is hidden, so it will not show in your report. Then, I add the logic to hide or show the Plan and Strategy data item on their respective Visibility properties.</p>
<p> </p>
<p>Hope this helps,</p>
<p> </p>
<p>P.</p>
Andrea05
<p>Hello,</p>
<p> </p>
<p>I understand that this thread is very old but I would like to extend upon the above solution.</p>
<p> </p>
<p>But I would like to know what you would do if you had the following scenario:</p>
<p> </p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Plan Strategy Project</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">
</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Plan 1 Strategy 1 Project 1</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Plan 1 Strategy 2 Project 1</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Plan 1 Strategy 3 Project 1</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Plan 2 Strategy 4 Project 2</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Plan 3 Strategy 4 Project 3</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Plan 3 Strategy 4 Project 2</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Plan 3 Strategy 4 Project 2</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> </p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Where the results would be:</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> </p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Plan Strategy Project</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">
</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Plan 1 Strategy 1 Project 1</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> Strategy 2 </p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> Strategy 3 </p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Plan 2 Strategy 4 Project 2</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Plan 3 Strategy 4 Project 3</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> Strategy 4 Project 2</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> </p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Whereby you allow duplicates in the Plan group but only if they have distinct Projects?</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> </p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Thanks!</p>