6 Replies Latest reply: Nov 1, 2016 2:21 AM by suresh m RSS

    Sort by Frequency Desc in Qliksense

    suresh m

      Hi Team,

       

      I have one Requirement on Sorting,

       

      i need to sort 2 dimensions data by frequency  desc, is is possible to write any expression to achieve  my requirement.

       

       

      Thanks&Regards

      suresh

        • Re: Sort by Frequency Desc in Qliksense
          Ruben Marin

          Hi suresh, you can try sorting descending by expression and using Count() in expression:

          -For Dim1:

          Count(Dimension1FieldNameOrExpression)

           

          -For Dim2:

          Count(Dimension2FieldNameOrExpression)

            • Re: Sort by Frequency Desc in Qliksense
              suresh m

              Hi Marin,

               

              Thank you so much for immediate Response,

              i tried as count(-BankName) and Count(-Routing)

              Not sorting perfectly

              can u elaborate expression with my dimensions it will be very helpful

              BankName

              Routing


              These 2 are dimensions

                • Re: Sort by Frequency Desc in Qliksense
                  Ruben Marin

                  Hi Suresh, try removing the '-':

                  count(BankName)

                  Count(Routing)


                  The descending option is a drop-down in Sense sort properties. If doesn't works post an image of the values sorted incorrectly so I can make an idea of what's happening.

                    • Re: Sort by Frequency Desc in Qliksense
                      suresh m

                      HI Marin,

                       

                      We are sorting on cyclic group, 3 dimension need to sort on ascending --> for this we use numeric sorting Ascending Option

                       

                      2 Dimension Need to Sort on Frequency Descending -->  I tried as -Count(BankName) & -Count(Routing)

                      First Dimension works Perfect but second one not sorting

                      4 Dimensions need to Sort in a custom sorting, wrote an Expressions for those.

                      This is the Requirement,

                       

                      So Please suggest any other way to sort Frequency desc

                        • Re: Sort by Frequency Desc in Qliksense
                          Ruben Marin

                          Hi suresh, I don't really know what's happening, I suppose that there are repeated values for this 2 dimensions in the previous dimension, like:

                          captura1.png

                           

                          It's sorted by count, for company 71 the first account it's not the most frequent in that company, but it's the most frequent overall (95 occurences in both companies).

                           

                          To avoid this I usually use dual in the dimension, adding the value of the first dimension so each value can be calculated independently:

                          captura2.png

                           

                          Here the account 4700000001 is sorted by company, as each one is internally a different dimension value

                          • Re: Sort by Frequency Desc in Qliksense
                            suresh m

                            Hi Marin,

                             

                            -count(Dimension1)

                            &

                            -Count(Dimension2)

                             

                            these are working in my case, Thank you so much..

                             

                            Regards

                            suresh