8 Replies Latest reply on Apr 2, 2020 1:46 PM by Barb Reiser

    Grouping issue

    Barb Reiser

      I'm doing a Union and I have two fields that I need to group within one column, but the data is sampled on the 2nd source, so it's not showing one of the two items to be able to do the grouping. I've tried to select Use All Data but it still samples. Any ideas on how to make this work?

        • 1. Re: Grouping issue
          Jonathan Drummey

          Hi,

           

          I seem to remember someone else posting another method but I can't find it, here's my suggestion:

           

          Screen Shot 2020-03-20 at 9.16.38 PM.png

           

          The first two aggregate steps get the unique list of Category values to group, then in the Union step the Category field is duplicated to create a Group field and that is grouped, then once a unique list of Category/Group rows is created that can be joined back to the original union.

           

           

          Jonathan

          1 of 1 people found this helpful
          • 2. Re: Grouping issue
            Barb Reiser

            Thanks Jonathan! I'll try this out. What I did yesterday to get me by, was create an If Then statement to basically rename that one field, If Location = "AB" then "BC" Else Location END and then union based on that new field.

             

            Barb

            • 3. Re: Grouping issue
              Barb Reiser

              Hi Jonathan,

               

              I tried your suggestion but it didn't work for me. The problem that I'm having is that the data set is sampled, so it's not bringing in all the categories to allow me to rename them or even exclude them if I don't want them. Any other ideas?

               

              Barb

              • 4. Re: Grouping issue
                Jonathan Drummey

                If you turn off sampling on the two Input steps does it then work for you? (If not then I’ve got other ideas).

                 

                Jonathan

                • 5. Re: Grouping issue
                  Barb Reiser

                  It doesn't let me turn off sampling. Even when I select Use all data, it still samples.

                  • 6. Re: Grouping issue
                    Jonathan Drummey

                    Hi,

                     

                    I have some questions:

                    1) Can you tell me more about the size of the original data sets in terms of number of rows, number of columns & data types/field sizes?

                    2) Also after the aggregate step how many values are you expecting to see?

                    3) Does your flow match the one I created above or are there additional steps?

                     

                    I'm trying to replicate this behavior...I can get sampling to happen on the Aggregate step however when I turn on the Use All Data flag I'm not getting the sampling on the Aggregate step anymore, and that's with 2.8M values in the Aggregate output, so I'm trying to understand how your data is different.

                     

                    The ideas I have are:

                     

                    Idea #1) In the Input step de-select all the fields except the field to group, and still use all data.

                     

                    Idea #2) a. Add an Output step after the unions of the aggregate results so you have a complete list of values. Run the flow. Create a new flow with that output as an Input, and turn off sampling. Theoretically you should be able to group now.

                     

                    Jonathan

                    • 7. Re: Grouping issue
                      Barb Reiser

                      Hi Jonathan,

                       

                      My one source has 1.6M for number of records. I have a list of 10 locations in the category I was looking at. I had submitted a support ticket and Tableau contacted me yesterday saying they were going to look into it.

                       

                      Aside from that issue, I'm having a terrible time with my flow. It was working but now I keep getting this collate error, then there's the Failure evaluating to database error, and when my flow does run, the hyper file is blank. I've tried multiple versions, from 2019.2, 2019.3, 2019.4, 2020 versions. Nothing works. We updated our server to 2019.4 so I was so excited to be able to connect directly to tableau server but that's taking forever and day so I found it is much easier to just do an extract in desktop and put that in my flow. But again, nothing is working right now, super frustrated with it. ready to throw the whole thing in the trash. I submitted a support case for that too.

                      • 8. Re: Grouping issue
                        Barb Reiser

                        I'm back in business with my flow working now. Tableau Support contacted me back. I'm using the 2019.4.1 version. They had me move one of my excel files to another folder. They said there is a known bug that causes an error when your are connecting to 2 excel files in the same folder. So, now if I can figure out the category issue to be able to see all items, I'll be all set. I'll definitely post back when Tableau contacts me back about this issue to.