Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Pivot Table

Please find the below table and let me how can i achieve the my expression

CountryCityCountExpression?
IndiaHyd1Chennai+Mumbai+Delhi+New Jersey (14)
IndiaChennai2Hyd+Mumbai+Delhi+New Jersey (13)
India

Mumbai

3Hyd+Chennai+Delhi+New Jersey (12)
IndiaDelhi4Hyd+Chennai+Mumbai+New Jersey (11)
USANew Jersey5Hyd+Chennai+Mumbai+Delhi (10)

If you observe my expression,always i have to exclude respective city for that row.

4 Replies
MK9885
Master II
Master II

I do not think it is possible to write such an expression with it gives you

+ with strings and number at the end.

It is possible to show one City per column but not a mix of all with +

If you really want that then use your last Column into Inline table or add a column next to count as you've done above, without numeric values.

ASFAIK it can;t be done, maybe someone with expertise level can guide you well?

rupamjyotidas
Specialist
Specialist

Simplest will be this

Sum(TOTAL Count) - Sum(Count)

trdandamudi
Master II
Master II

Please see the attachment for the solution and hope this helps..

PivotWithConcat_Published.jpg

Anil_Babu_Samineni

One more way this by using Set Analysis, But, This is not make sense any how. Hope getting some idea

=If(Count = 1, Sum({<City = {'Chennai','Delhi','Mumbai','New jersey'}>} TOTAL Count),

     If(Count = 2, Sum({<City = {'Delhi','Hyd','Mumbai','New jersey'}>} TOTAL Count),

          If(Count = 3, Sum({<City = {'Chennai','Delhi','Hyd','New jersey'}>} TOTAL Count),

               If(Count = 4, Sum({<City = {'Chennai','Hyd','Mumbai','New jersey'}>} TOTAL Count),

                    If(Count = 5, Sum({<City = {'Chennai','Delhi','Hyd','Mumbai'}>} TOTAL Count)

                      )

                  )

             )

       )

   )

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful